class Shell.CommandOutput


The output of a shell command executed via Shell.command. This class offers access to the stdOut and stdErr of the launched command, with utility methods to wait for the full output or parse the stream incrementally.

Summary

Public constructors

CommandOutput(command: String, shellProcess: ShellProcess)

Public functions

Boolean

Returns whether the launched shell command is still running.

Public properties

String

Awaits the process termination and returns the full stderr of the launched command.

InputStream

Allows incrementally consuming the stderr of a single command as an InputStream.

String

Awaits the process termination and returns the full stdout of the launched command.

InputStream

Allows incrementally consuming the stdout of a single command as an InputStream.

Public constructors

CommandOutput

Added in 2.4.0-beta01
CommandOutput(command: String, shellProcess: ShellProcess)

Public functions

isRunning

Added in 2.4.0-beta01
fun isRunning(): Boolean

Returns whether the launched shell command is still running.

Public properties

stdErr

Added in 2.4.0-beta01
val stdErrString

Awaits the process termination and returns the full stderr of the launched command.

stdErrStream

Added in 2.4.0-beta01
val stdErrStreamInputStream

Allows incrementally consuming the stderr of a single command as an InputStream.

stdOut

Added in 2.4.0-beta01
val stdOutString

Awaits the process termination and returns the full stdout of the launched command.

stdOutStream

Added in 2.4.0-beta01
val stdOutStreamInputStream

Allows incrementally consuming the stdout of a single command as an InputStream.