User Guide
76 Server-Side ActionScript Language Reference
File.name
Availability
Flash Media Server 2.
Usage
fileObject.name
Description
Property (read-only); a string indicating the name of the file. The value is an empty string if
the File object was created with a invalid path.
File.open()
Availability
Flash Media Server 2.
Usage
fileObject.open("type","mode")
Parameters
type A string indicating the encoding type for the file. The following types are supported:
■ "text" Opens the file for text access using the default file encoding.
■ "binary" Opens the file for binary access.
■ "utf8" Opens the file for UTF-8 access.
mode A string indicating the mode in which to open the file. The following modes are valid
and can be combined (modes are case-sensitive and multiple modes must be separated by
commas):
■ "read" Indicated that the file is opened for reading.
■ "write" Indicates that the file is opened for writing.
■ "readWrite" Indicates that the file is opened for both reading and writing.
■ "append" Opens file for write. Positions the file pointer at the end of the file when you
attempt to write to the file.
■ "create" Creates a new file if the file is not present. If file exists, its contents are
destroyed.
NOTE
If both "read" and "write" are set, then "readWrite" is automatically set.