IO::OpenFile

IO::OpenFile(fileName, fileMode) ⇒ FILE

Open file. Returns FILE object or null.

Table 1. Parameters

fileName

String

File name to open.

openingMode

String

Mode file should be opened in. More can be found there.

Return

File class or NULL if error occurred.

f = IO::OpenFile("/tmp/a.txt", "r");
while (!f.eof) println(f.readLine()); // Will print contents of the file