os/Process
-
class Process
-
-
static method new(args: ArrayList<T>) → Process
-
static method new~withEnv(args: ArrayList<T>, env: HashMap<K,V>) → Process
-
method setStdout(stdOut: Pipe)
-
method setStdin(stdIn: Pipe)
-
method setStderr(stdErr: Pipe)
-
method setEnv(env: HashMap<K,V>)
-
method setCwd(cwd: String)
-
method execute → Int
- Execute the process and wait for it to end
-
method wait → Int
- Wait for the process to end. Bad things will happen if you haven’t called executeNoWait before.
-
method executeNoWait
- Execute the process without waiting for it to end. You have to call wait manually.
-
method getOutput → String
- Execute the process, and return all the output to stdout
as a string, if the program exited normally.
If there was an error (e.g. the return code wasn’t 0), this function
will return null
-
method getErrOutput → String
- Execute the process, and return all the output to stderr
as a string
-
method communicate(data: String, stdoutData, stderrData: String *) → Int
- Send data to the process, wait for the process to end and get the
stdout and stderr data. You have to do setStdIn(Pipe new())/
setStdOut(Pipe new())/setStdErr(Pipe new())
before in order to send / get the data. You have to run executeNoWait before.
You can pass null as data, stdoutData or stderrData.
-
args → ArrayList<T>
-
executable → String
-
stdOut → Pipe
-
stdIn → Pipe
-
stdErr → Pipe
-
buf → String *
-
env → HashMap<K,V>
-
cwd → String