Package org.codehaus.groovy.runtime
Class ProcessResult
java.lang.Object
org.codehaus.groovy.runtime.ProcessResult
Captures the result of executing an external process, including
the standard output, standard error, and exit code.
def result = "ls -la".execute().waitForResult() assert result.ok println result.out
- Since:
- 6.0.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ProcessResult
-
-
Method Details
-
getOut
Returns the standard output of the process as a String. -
getErr
Returns the standard error of the process as a String. -
getExitCode
public int getExitCode()Returns the exit code of the process. -
isOk
public boolean isOk()Returnstrueif the process exited with code 0. -
toString
-