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 1.0.0-alpha02
CommandOutput(command: String, shellProcess: ShellProcess)

Public functions

isRunning

Added in 1.0.0-alpha02
fun isRunning(): Boolean

Returns whether the launched shell command is still running.

Public properties

stdErr

Added in 1.0.0-alpha02
val stdErrString

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

stdErrStream

Added in 1.0.0-alpha02
val stdErrStreamInputStream

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

stdOut

Added in 1.0.0-alpha02
val stdOutString

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

stdOutStream

Added in 1.0.0-alpha02
val stdOutStreamInputStream

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