<file-reader> ( path encoding -- stream )
Factor handbook > Input and output > Reading and writing files

Prev:Examples of reading and writing files
Next:<file-writer> ( path encoding -- stream )


Vocabulary
io.files

Inputs and outputs
patha pathname string
encodingan encoding descriptor
streaman input stream


Word description
Outputs an input stream for reading from the specified pathname using the given encoding.

Notes
Most code should use with-file-reader instead, to ensure the stream is properly disposed of after.

Errors
Throws an error if the file is unreadable.

Definition