with-input-stream ( stream quot -- )
Factor handbook » Input and output » Streams » Default input and output streams

Prev:seek-input ( n seek-type -- )
Next:with-input-stream* ( stream quot -- )


Vocabulary
io

Inputs
streaman input stream
quota quotation


Outputs
None

Word description
Calls the quotation in a new dynamic scope, with input-stream rebound to stream. The stream is closed if the quotation returns or throws an error.

See also
with-input-stream*

Definition