I/O and Network

I/O and Network

General I/O

STDOUT

Global variable referring to the standard out stream.

STDERR

Global variable referring to the standard error stream.

STDIN

Global variable referring to the standard input stream.

open(filename[, read, write, create, truncate, append]) → IOStream

Open a file in a mode specified by five boolean arguments. The default is to open files for reading only. Returns a stream for accessing the file.

open(filename[, mode]) → IOStream

Alternate syntax for open, where a string-based mode specifier is used instead of the five booleans.