User Guide
File class 65
Method summary for the File class
Method Description
File.close()
Closes the file.
File.copyTo() Copies a file to a different location or to the same location
with a different filename.
File.eof() Returns a Boolean value indicating whether the file pointer is
at the end of file (
true) or not (false).
File.flush() Flushes the output buffers of a file.
File.list() If the file is a directory, returns an array with an element for
each file in the directory.
File.mkdir() Attempts to create a directory in the file directory.
File.open() Opens a file so that you can read from it or write to it.
File.read() Reads the specified number of characters from a file and
returns a string.
File.readAll() Reads the file and returns an array with an element for each
line of the file.
File.readByte() Reads the next byte from the file and returns the numeric
value of the next byte, or -1 if the operation fails.
File.readln() Reads the next line from the file and returns it as a string.
File.remove() Removes the file or directory pointed to by the File object.
File.renameTo() Moves or renames a file.
File.write() Writes data to a file.
File.writeAll()
Takes an array as a parameter and calls the File.writeln()
method on each element in the array.
File.writeByte() Writes a byte to a file.
File.writeln()
Writes data to a file and adds a platform-dependent end-of-
line character after outputting the last parameter.
getGlobal() Skips a specified number of bytes and returns the new file
position.
File.toString() Returns a string that indicates the name of the File object.