Logo ProcessKit API Reference

Stdin Type

A source for a child process's standard input, attached with `Command.Stdin`. When set, the child's stdin is a pipe fed from this source; the pipe is closed (EOF) once the source is exhausted — unless `Command.KeepStdinOpen` is also set, in which case the pipe is left open after the source is drained so the caller can keep writing to it interactively via `RunningProcess.TakeStdin` (which becomes available once the source feed has finished, so the source and the interactive writer never write the pipe at the same time).

Static members

Static member Description

Stdin.Empty

Full Usage: Stdin.Empty

Returns: Stdin

No input — the child sees end-of-file immediately.

Returns: Stdin

Stdin.FromAsyncLines(lines)

Full Usage: Stdin.FromAsyncLines(lines)

Parameters:
Returns: Stdin

Lines (each written followed by `\n`) produced asynchronously. `lines` must not be null (`ArgumentNullException`).

lines : IAsyncEnumerable<string>
Returns: Stdin

Stdin.FromBytes(bytes)

Full Usage: Stdin.FromBytes(bytes)

Parameters:
    bytes : byte[]

Returns: Stdin

Raw bytes. `bytes` must not be null (`ArgumentNullException`). A defensive copy is taken at this boundary — the built `Command`/`Stdin` never aliases the caller's array, so mutating it afterward (including between retries) has no effect on what is written to the child.

bytes : byte[]
Returns: Stdin

Stdin.FromFile(path)

Full Usage: Stdin.FromFile(path)

Parameters:
    path : string

Returns: Stdin

The contents of a file, streamed to the child. `path` must not be null (`ArgumentNullException`).

path : string
Returns: Stdin

Stdin.FromLines(lines)

Full Usage: Stdin.FromLines(lines)

Parameters:
    lines : string seq

Returns: Stdin

Lines (each written followed by `\n`) produced eagerly from a sequence. `lines` must not be null (`ArgumentNullException`).

lines : string seq
Returns: Stdin

Stdin.FromStream(stream)

Full Usage: Stdin.FromStream(stream)

Parameters:
Returns: Stdin

An open readable stream, copied to the child. `stream` must not be null (`ArgumentNullException`).

stream : Stream
Returns: Stdin

Stdin.FromString(text)

Full Usage: Stdin.FromString(text)

Parameters:
    text : string

Returns: Stdin

Text encoded with the command's `StdinEncoding` (UTF-8 by default). `text` must not be null (`ArgumentNullException` — a C# caller that forgets a null check would otherwise fail obscurely inside the background feeder rather than at the API boundary).

text : string
Returns: Stdin

Type something to start searching.