Children of the file IO prototype object ($core.file_io_proto) represent files. File objects are garbage collected (and automatically closed) when no longer used (in other words, you don't have to explicitly worry about management and there's no chance of file handle leakage).
See File Utilities for details how to open/read/write files.
Explicitly closes this file.
Returns true if file is open/closed.
Returns true if file was opened in text/binary mode.
Returns true if file was opened for reading/writing.
none file:writeline(STR line)
STR file:read(INT number)
INT file:write(STR data)
Reads/writes from/to the specified file.
The read() verb reads up to the specified number of bytes from the file and returns them.
The write() verb writes the specified data to the file and returns the number of bytes written.
f:readline() => "foobar"
f:write("~0A~0D") => 2
none file:seek(INT location, STR whence)
The size() verb returns the size of file.
The tell() verb returns the current position in file.
The seek() verb seeks to a position in file. whence is one of: "SEEK_SET" - seek relative to beginning, "SEEK_CUR" - seek relative to current position, "SEEK_END" - seek relative to end.
f:seek(0, "SEEK_END") => _
Returns true if file is at end of file.