RedirectableOutput

trait RedirectableOutput[+P <: ([_] =>> ProcessLike)]

The capability to redirect the output of a process or a process group

Type Params
P

Self type without the RedirectableOutput capability

class Object
trait Matchable
class Any

Value members

Abstract methods

def connectOutput[R <: OutputRedirection, O](target: R)(implicit outputRedirectionType: Aux[R, O]): P[O]

The low level operation to attach an output to a process

The low level operation to attach an output to a process

Use one of the other methods of this trait for convenience. This is the place where the output type gets calculated with a helper type class called OutputRedirectionType which implements the type level computation for figuring out O.

Type Params
O

Output type

R

Output redirection type

Value Params
outputRedirectionType

Helper for dependent output type

target

Redirection target

Returns

Returns a new process or process group with its output redirected and its output redirection capability removed.

Concrete methods

def >(sink: ProxSink[Byte]): P[Unit]

Redirects the output to a sink.

Redirects the output to a sink.

The process output type will be Unit. An alias for toSink

Value Params
sink

Target sink

Returns

Returns a new process or process group with its output redirected and its output redirection capability removed.

def >(path: Path): P[Unit]

Redirects the output to a file natively

Redirects the output to a file natively

An alias for toFile

Value Params
path

Target file path

Returns

Returns a new process or process group with its output redirected and its output redirection capability removed.

def >#[O : ProxMonoid](pipe: ProxPipe[Byte, O]): P[O]

Redirects the output to a pipe and folds its output with a monoid instance.

Redirects the output to a pipe and folds its output with a monoid instance.

The process output type will be the same as the pipe's output type. An alias for toFoldMonoid

Type Params
O

Output type of the pipe. Must have a monoid instance.

Value Params
pipe

Target pipe

Returns

Returns a new process or process group with its output redirected and its output redirection capability removed.

def >>(path: Path): P[Unit]

Redirects the output to a file natively in append mode

Redirects the output to a file natively in append mode

An alias for appendToFile

Value Params
path

Target file path

Returns

Returns a new process or process group with its output redirected and its output redirection capability removed.

def >?[O](pipe: ProxPipe[Byte, O]): P[Vector[O]]

Redirects the output to a pipe and collects its output to a vector

Redirects the output to a pipe and collects its output to a vector

The process output type will be a vector of the pipe's output type. An alias for toVector

Type Params
O

Output type of the pipe

Value Params
pipe

Target pipe

Returns

Returns a new process or process group with its output redirected and its output redirection capability removed.

def appendToFile(path: Path): P[Unit]

Redirects the output to a file natively in append mode

Redirects the output to a file natively in append mode

An alias for &gt;&gt;

Value Params
path

Target file path

Returns

Returns a new process or process group with its output redirected and its output redirection capability removed.

def drainOutput[O](pipe: ProxPipe[Byte, O]): P[Unit]

Redirects the output to a pipe and drains it regardless of its output type.

Redirects the output to a pipe and drains it regardless of its output type.

The process output type will be Unit.

Type Params
O

Output type of the pipe

Value Params
pipe

Target pipe

Returns

Returns a new process or process group with its output redirected and its output redirection capability removed.

def foldOutput[O, R](pipe: ProxPipe[Byte, O], init: R, fn: (R, O) => R): P[R]

Redirects the output to a pipe and folds it with a custom function.

Redirects the output to a pipe and folds it with a custom function.

The process output type will be R.

Type Params
O

Output type of the pipe

R

Result type of the fold

Value Params
fn

The fold function

init

The initial value for the fold

pipe

Target pipe

Returns

Returns a new process or process group with its output redirected and its output redirection capability removed.

def toFile(path: Path): P[Unit]

Redirects the output to a file natively

Redirects the output to a file natively

An alias for &gt;

Value Params
path

Target file path

Returns

Returns a new process or process group with its output redirected and its output redirection capability removed.

def toFoldMonoid[O : ProxMonoid](pipe: ProxPipe[Byte, O]): P[O]

Redirects the output to a pipe and folds its output with a monoid instance.

Redirects the output to a pipe and folds its output with a monoid instance.

The process output type will be the same as the pipe's output type. An alias for &gt;#

Type Params
O

Output type of the pipe. Must have a monoid instance.

Value Params
pipe

Target pipe

Returns

Returns a new process or process group with its output redirected and its output redirection capability removed.

def toSink(sink: ProxSink[Byte]): P[Unit]

Redirects the output to a sink.

Redirects the output to a sink.

The process output type will be Unit. An alias for &gt;

Value Params
sink

Target sink

Returns

Returns a new process or process group with its output redirected and its output redirection capability removed.

def toVector[O](pipe: ProxPipe[Byte, O]): P[Vector[O]]

Redirects the output to a pipe and collects its output to a vector

Redirects the output to a pipe and collects its output to a vector

The process output type will be a vector of the pipe's output type. An alias for &gt;?

Type Params
O

Output type of the pipe

Value Params
pipe

Target pipe

Returns

Returns a new process or process group with its output redirected and its output redirection capability removed.