Write a string to a file
Check whether a file handle is actually a null pointer
Standard output
Standard input
Standard output
Read the contents of a text file into a string
This checks the size of the file before beginning to read, and only
reads that many bytes, to ensure that it remains a total function if
the file is appended to while being read.
This only works reliably with text files, since it relies on null-terminated
strings internally.
Returns an error if filepath is not a normal file.
Open a file using C11 extended modes.
the filename
the mode; either Read, WriteTruncate, Append, ReadWrite, ReadWriteTruncate, or ReadAppend
Open a file
the filename
the mode; either Read, WriteTruncate, Append, ReadWrite, ReadWriteTruncate, or ReadAppend
Open a file
the filename
the mode as a String ("r"
, "w"
, or "r+"
)
Return the size of a File
Returns an error if the File is not an ordinary file (e.g. a directory)
Also note that this currently returns an Int, which may overflow if the
file is very big
Check if a file handle has reached the end
Write a line to a file
a file handle which must be open for writing
the line to write to the file
Read a line from a file
a file handle which must be open for reading
Read up to a number of characters from a file
a file handle which must be open for reading
Check if a file handle has reached the end
Modes for opening files
An error from a file operation
A file handle