fopen ( path mode -- alien )
Factor handbook » Input and output » ANSI C streams

Prev:<c-writer> ( handle -- stream )
Next:fwrite ( data length alien -- )


Vocabulary
io.streams.c

Inputs
patha pathname string
modean access mode specifier


Outputs
aliena C FILE* handle


Word description
Opens a file named by path. The mode parameter should be something like "r" or "rw"; consult the fopen(3) manual page for details.

Errors
Throws an error if the file could not be opened.

Notes
User code should call <file-reader> or <file-writer> to get a high level stream.

Definition