command | Source Codeshared Task command( String command, Path path = ..., Input? input = ..., Output? output = ..., Error? error = ..., {< String-> String>*} environment = ...) Returns a Task that will run the given command in a new a new process using executeCommand.
Returns true if process exit code is 0 , false otherwise.
Parameters: - command
The command to be run in the new
process, usually a program with a list
of its arguments.
- path = current
The directory in which the process runs.
- input = currentInput
The source for the standard input stream
of the process, or null if the standard
input should be piped from the current
process.
- output = currentOutput
The destination for the standard output
stream ofthe process, or null if the
standard output should be piped to the
current process.
- error = currentError
The destination for the standard output
stream ofthe process, or null if the
standard error should be piped to the
current process.
- environment = currentEnvironment
Environment variables to pass to the
process. By default the process inherits
the environment variables of the current
virtual machine process.
|
executeCommand | Source Codeshared Integer? executeCommand( String command, Path path = ..., Input? input = ..., Output? output = ..., Error? error = ..., {< String-> String>*} environment = ...) Creates and starts a new process, running the given command.
Waits for process termination and returns its exit code.
Parameters: - command
The command to be run in the new
process, usually a program with a list
of its arguments.
- path = current
The directory in which the process runs.
- input = currentInput
The source for the standard input stream
of the process, or null if the standard
input should be piped from the current
process.
- output = currentOutput
The destination for the standard output
stream ofthe process, or null if the
standard output should be piped to the
current process.
- error = currentError
The destination for the standard output
stream ofthe process, or null if the
standard error should be piped to the
current process.
- environment = currentEnvironment
Environment variables to pass to the
process. By default the process inherits
the environment variables of the current
virtual machine process.
See also: createProcess |
exitCodeToOutcome | Source Codeshared Outcome exitCodeToOutcome( Integer exitCode, String command, Path path = ...) Convert a command exit code into an Outcome.
If exitCode is 0 , a successfull outcome will be returned.
If exitCode is not 0 , a failure outcome will be returned with information about executed command.
|