Input/output

FileStream

OutputFileStream - Writes formatted output to a file.
Members: OutputFileStream, ~OutputFileStream, write, writeln

stdout - Returns a stream writing to standard output.

stderr - Returns a stream writing to standard error.

stdio

FileError - An error reading a file.
Members: CouldNotOpen, print

println - Prints the given value followed by a newline.

print - Prints the given value without allocating. Values that aren't copyable must be borrowed explicitly, so printing never moves from them.

join - Joins the array elements into a string with the given separator.

sum - Returns the sum of the array elements, aborting on empty arrays.

readLine - Reads a line from stdin.

readFile - Reads the entire file into a string, or returns an error if the file can't be opened.

writeFile - Writes the string to the named file.

removeFile - Deletes the named file, returning true on success.

assertFail - Prints the message to stderr and aborts.