Specifications

ImplementationDescriptionModel
immediately and leave
the follow-up to the
timerFired entry point
Static Text I/O functions
Reads and returns the contents of the file fileName if possible;
otherwise throws an exception.
read( fileName : String, codec :
String ) : String
The optional argument codec specifies the text encoding used
to read the file; see text encoding.
Writes the string content to the file fileName if possible
(completely replacing the original contents if the file already
exists); otherwise throws an exception.
write( fileName : String, content
: String, codec : String )
The optional argument codec specifies the text encoding used
to write the file contents; see text encoding.
Static Binary I/O functions
The functions presented in this section read and write sequences of bytes (rather than text
streams). Hence there is no need to specify a codec (see text encoding).
Reads and returns the content of the file fileName if
possible; otherwise throws an exception.
readByteArray( fileName : String ) :
ByteArray
Writes the content to the file fileName if possible
(completely replacing the original contents if the file
already exists); otherwise throws an exception.
writeByteArray( fileName : String,
content : ByteArray )
Constructor
Creates a file object with the fileName. If fileName is missing or
is not a String, an exception is thrown.
File( fileName : String, codec
: String )
The optional argument codec specifies the text encoding used
to read or write the file contents; see text encoding.
Properties
The File object's properties are read-only.
The name of the file including the extension.
name : String
The path of the file.
path : String
415
Enfocus Switch 10