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

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


Vocabulary
io

Inputs
streaman input stream


Outputs
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