Types

File

Represents a file in a file system (S_IFREG)

Parent types

Methods

close(f:File)
Close a file and sets the "fd" field to null. Uses CLOSE(2). Throws InvalidArgument if file is not open. Throws FileIOFail if an underlying error occurs.
init(f:File, path:Str)
init(f:File, fd:Int)
lines(f:File, cb:Fun)
Iterate over lines of the file
lines(f:File)
lines(f:File, lines_:Arr)
open(f:File, flags:Str)
Open a file and set the "fd" field to the file descriptor. Uses OPEN(2). Throws InvalidArgument if file is already open. Throws FileIOFail if an underlying error occurs.
Str(f:File)
String representation of File