Open a file; returns a FileHandle, or an error on failure. The default mode "r+" opens for reading and writing, creating the file if needed.
import "file" fh = file.open("data.txt", "r") if fh isa error then print fh.message else while not fh.atEnd print fh.readLine end while fh.close end if
There was an error while loading. Please reload this page.