Revision as of 20:29, 6 March 2008 by Aschran
The FileIO class is a subclass of the IO class. Only elements of the FileIO class that extend or override the parent class are listed here. Only files of up to 2 GiB in size are supported by this class.
fun int open(string path[, int flags])
- Opens the specified file, returning true on success and false otherwise. The flags can optionally be used to specify the mode in which to open the file (
fun void seek(int pos)
- Seeks to the specified byte offset from the start of the file.
fun int size()
- Returns the size of the file in bytes, or -1 if a file is not open.
fun int isDir()
- Returns true if the opened file is a directory, false otherwise.
fun string dirList()
- Returns an array containing the names of each file in the opened directory, or an empty array if the opened file is not a directory.
- Pre-created files for reading from and writing to stdin and stdout.
- These flags can optionally be passed to the
openfunction to specify the mode in which to open the file.