
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
47
File constructor
fileObject = new File(name)
Creates an instance of the File class.
Availability
Flash Media Server 2
Parameters
name A string indicating the name of the file or directory. The name can contain only UTF-8 encoded characters;
high byte values can be encoded by using the URI character-encoding scheme. The specified name is mapped to a
system path by using the mappings specified in the
FileObject section of the Application.xml file. If the path is
invalid, the
name property of the object is set to an empty string, and no file operation can be performed.
Returns
A File object if successful; otherwise,
null.
Example
The following code creates an instance of the File class:
var errorLog = new File("/logs/error.txt");
Note that the physical file isn’t created on the hard disk until you call File.open().
File.canAppend
fileObject.canAppend
Read only; a boolean value indicating whether a file can be appended (true) or not (false). The property is
undefined for closed files.
Availability
Flash Media Server 2.0
File.canRead
fileObject.canRead
Read-only; A boolean value indicating whether a file can be read (true) or not (false).
Availability
Flash Media Server 2
File.canReplace
fileObject.canReplace
Read-only; A boolean value indicating whether a file was opened in "create" mode (true) or not (false). This
property is undefined for closed files.
Availability
Flash Media Server 2
Commenti su questo manuale