The Process class allows you to start processes, track their output, and so on.
Allocates and returns a new Process object.
True if there is no more data to be read from the process output, otherwise false.
Sets the text codec to codec. The codec is used for reading and writing from and to the process, respectively. Common codecs are supported, for example: “UTF-8”, “UTF-16”, and “ISO 8859-1”.
The exit code of the process. This is needed for retrieving the exit code from processes started via start(), rather than exec().
The directory the process will be started in. This only has an effect if set before the process is started.
Frees the resources associated with the process. It is recommended to always call this function as soon as you are finished with the process.
Schedules the stdin channel of process to be closed. The channel will close once all data has been written to the process. After calling this function, any attempts to write to the process will do nothing.
Returns the value of the variable varName in the process’ environment.
Kills the process, causing it to exit immediately.
Reads and returns one line of text from the process output, without the newline character(s).
Reads and returns all data from the process’ standard error channel.
Reads and returns all data from the process’ standard output channel.
Sets the value of variable varName to varValue in the process environment. This only has an effect if called before the process is started.
Starts the program at filePath with the given list of arguments. Returns true if the process could be started and false otherwise.
Note: This call returns right after starting the process and should be used only if you need to interact with the process while it is running. Most of the time, you want to use exec() instead.
Tries to terminate the process. This is not guaranteed to make the process exit immediately; if you need that, use kill().
Blocks until the process has finished or timeout milliseconds have passed (default is 30000). Returns true if the process has finished and false if the operation has timed out. Calling this function only makes sense for processes started via start() (as opposed to exec()).
Writes text into the process’ input channel.
Writes text, followed by a newline character, into the process’ input channel.
Generated using TypeDoc