User Guide

File class 69
Description
Property (read-only); a Boolean value indicating whether you can write to a file (true) or not
(
false).
File.close()
Availability
Flash Media Server 2.
Usage
fileObject.close()
Parameters
None.
Returns
A Boolean value indicating whether the file was closed successfully (true) or not (false).
Description
Method; closes the file. Returns false if the file is not open. This method is called
automatically on an open File object when the object is out of scope.
Example
The following code closes the /path/file.txt file:
if (x.open("/path/file.txt", "read") ){
// Do something here.
x.close();
}
NOTE
If File.open() was called to open the file, the mode in which the file was opened is
respected. For example, if the file was opened in read mode, you can read from the file,
but you cannot write to the file.