Specifications
Deletes the file if possible; otherwise throws an exception.
remove()
Member Text I/O functions
Reads one character from the file if possible; otherwise throws
an exception. The character is represented as a 16-bit Unicode
code point.
readChar() : Number
Returns the entire content of the file as a string if it can be read;
otherwise throws an exception.
read() : String
Reads one line from file if possible; otherwise throws an
exception. Retains any trailing whitespace.
readLine() : String
Returns the contents of the file as an Array of strings, one for
each line. Linebreaks are stripped from the strings. If the file
could not be read, an exception is thrown.
readLines() : String[ ]
Writes one character to the file if possible; otherwise throws an
exception. The character is represented as a 16-bit Unicode code
point.
writeChar( char : Number )
Writes length number of characters from data to the file if
possible; otherwise throws an exception.
write( data : String, length :
Number )
Writes the line data to the file and adds a linebreak. If the file
could not be written error is returned.
writeLine( data : String )
Member Binary I/O functions
The functions presented in this section ignore the file's codec (see text encoding). Never mix
these binary I/O function with any of the text-oriented I/O functions on the same file. Violating
this rule has unpredictable results.
Reads one byte from the file if possible; otherwise throws
an exception.
readByte() : Number
Writes one byte to the file if possible; otherwise throws
an exception.
writeByte( byte : Number )
Dir class
The Dir class provides access to file system directory structures and their contents in a
platform-independent way. It provides a means of listing directory content, creating filenames
with proper path separators, etc.
Enum FilterSpec
This enum describes the filtering options available to Dir for entryList(). The filter value is specified
by OR-ing together values from the following list.
417
Enfocus Switch 10