stream-contents ( stream -- seq )
Factor handbook > Input and output > Streams > Stream utilities

Prev:each-line ( ... quot: ( ... line -- ... ) -- ... )
Next:contents ( -- seq )


Vocabulary
io

Inputs and outputs
streaman input stream
seqa string or a byte-array


Word description
Reads all elements in the given stream until the stream is exhausted. The type of the sequence depends on the stream's element type. The stream is closed after completion.

Errors
Throws an error if the I/O operation fails.

Definition