From f757fd44999ddc430f8a677a766ff56b03ee32d5 Mon Sep 17 00:00:00 2001 From: Tom Faulhaber Date: Fri, 4 Jun 2010 09:37:40 -0700 Subject: Autodoc commit for master/3353eeaf, 1.1.x/5293929c --- clojure.java.shell-api.html | 155 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 clojure.java.shell-api.html (limited to 'clojure.java.shell-api.html') diff --git a/clojure.java.shell-api.html b/clojure.java.shell-api.html new file mode 100644 index 00000000..8df4e531 --- /dev/null +++ b/clojure.java.shell-api.html @@ -0,0 +1,155 @@ + + + clojure.java.shell API reference (Clojure) + + + + + + + + + + + + + +
+ + +
+
+
+
+ +

API for clojure.java.shell + (master branch)

+by Chris Houser, Stuart Halloway
+
Usage: +
+(ns your-namespace
+  (:require clojure.java.shell))
+
+

Overview

+
Conveniently launch a sub-process providing its stdin and
+collecting its stdout
+ + +
+

Public Variables and Functions

+
+
+
+

sh

+ function
+
Usage: (sh & args)
+
+
Passes the given strings to Runtime.exec() to launch a sub-process.
+
+Options are
+
+:in    may be given followed by a String specifying text to be fed to the 
+       sub-process's stdin.  
+:out   option may be given followed by :bytes or a String. If a String 
+       is given, it will be used as a character encoding name (for 
+       example "UTF-8" or "ISO-8859-1") to convert the 
+       sub-process's stdout to a String which is returned.
+       If :bytes is given, the sub-process's stdout will be stored in 
+       a byte array and returned.  Defaults to UTF-8.
+:env   override the process env with a map (or the underlying Java
+       String[] if you are a masochist).
+:dir   override the process dir with a String or java.io.File.
+
+You can bind :env or :dir for multiple operations using with-sh-env
+and with-sh-dir.
+
+sh returns a map of
+  :exit => sub-process's exit code
+  :out  => sub-process's stdout (as byte[] or String)
+  :err  => sub-process's stderr (as byte[] or String)
+ Added in Clojure version 1.2
+ + Source +
+
+
+

with-sh-dir

+ macro
+
Usage: (with-sh-dir dir & forms)
+
+
Sets the directory for use with sh, see sh for details.
+ Added in Clojure version 1.2
+ + Source +
+
+
+

with-sh-env

+ macro
+
Usage: (with-sh-env env & forms)
+
+
Sets the environment for use with sh, see sh for details.
+ Added in Clojure version 1.2
+ + Source +
+ + +
+
+
+
+
+ +
+
Logo & site design by Tom Hickey.
+ Clojure auto-documentation system by Tom Faulhaber.
+
+ + + + \ No newline at end of file -- cgit v1.2.3-70-g09d2