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();
}