Next: File Library Exports, Up: File Library [Index]
The file library objects expose a collection of interfaces (functions and symbolic constants) concerned with file input/output.
Central to the file interfaces is the ‘file’ type - the opened files are identified by data of this type.
Objects of the ‘file’ type are large, since the I/O is buffered. Large here is about 2 to 4 kilobytes.
The library arranges for the opened files to be closed eventually, explicitly closing files still makes sense.
See Execution Completion Cleanup.
Most read/write operations are to/from text data (data of the intrinsic string type), text formatting of (integral and real) scalars is available and some exotic data types are supported for target/source of read/write operations (data types such as the ‘list’ type), yet only if so requested.
See List Library.
File operations do not recognize error conditions (not unless otherwise specified). The executed programs are terminated before the function that attempted a failed I/O operation returns.
See Of Errors.
The ‘file’ objects are not copyable and the copy operations on them do not create new objects, but only add new references to the existing ones.
See Referable Objects.