Monkey Documentation

Class Process


Properties:
Methods:
Functions:

Property Documentation

Method IsRunning : Bool () Property

Returns true is process is currently running.


Method Documentation

Method Kill : Void ( exitCode:Int )

Kills process.

Method ReadStderr : Int ( buffer:DataBuffer, offset:Int, count:Int )

Reads bytes from process stderr into buffer.

Returns the number of bytes read.

If the process is running and no bytes are available to be read, this method will block until at least 1 byte has been read.

If the process has finished and no bytes are available to be read, this method will return 0.

Method ReadStdout : Int ( buffer:DataBuffer, offset:Int, count:Int )

Reads bytes from process stdout into buffer.

Returns the number of bytes read.

If the process is running and no bytes are available to be read, this method will block until at least 1 byte has been read.

If the process has finished and no bytes are available to be read, this method will return 0.

Method Start : Void ( cmd:String )

Starts process.

Returns true if process started successfully.

Method StderrAvail : Int ()

Returns the number of bytes available to be read from process stderr.

Method StdoutAvail : Int ()

Returns the number of bytes available to be read from process stdout.

Method Wait : Int ()

Waits for process to finish and returns process exit code.

Method WriteStdin : Int ( buffer:DataBuffer, offset:Int, count:Int )

Writes bytes from buffer to process stdin.


Function Documentation

Function Execute : String ( cmd:String )

Runs a process, waits for it to finish, and returns the process stdout output.