Redirect

Types

Link copied to clipboard
object CAPTURE : Redirect

This will ensure that the stream content is returned as process's return. If both stdout and stderr are using this mode, their output will be correctly merged.

Link copied to clipboard
class Consume(val consumer: suspend (Flow<String>) -> Unit) : Redirect

Alternative to CAPTURE allowing to consume without delay a stream without storing it in memory, and so not returned at the end of process invocation.

Link copied to clipboard
object PRINT : Redirect

Redirect the stream to this process equivalent one. In other words, it will print to the terminal if this process is also doing so.

Link copied to clipboard
object SILENT : Redirect

Ignores the related stream.

Link copied to clipboard
class ToFile(val file: File, val append: Boolean = false) : Redirect

Override or append to a file.