Handbook
Glossary
stream-contents ( stream -- seq )
Factor handbook
»
Input and output
»
Streams
»
Stream utilities
Prev:
each-line ( ... quot: ( ... line -- ... ) -- ... )
Next:
read-contents ( -- seq )
Vocabulary
io
Inputs
stream
an input stream
Outputs
seq
a
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
USING:
destructors
;
IN:
io
:
stream-contents
( stream -- seq )
[
stream-contents*
]
with-disposal
;