public class ProcessResult
extends Object
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
| Constructor and description |
|---|
ProcessResult(String out, String err, int exitCode) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public String |
getErr()Returns the standard error of the process as a String. |
|
public int |
getExitCode()Returns the exit code of the process. |
|
public String |
getOut()Returns the standard output of the process as a String. |
|
public boolean |
isOk()Returns true if the process exited with code 0. |
|
public String |
toString() |
Returns the standard error of the process as a String.
Returns the exit code of the process.
Returns the standard output of the process as a String.
Returns true if the process exited with code 0.
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.