File.remove()

Availability

Flash Media Server 2.

Usage

fileObject.remove()

Parameters

None.

Returns

A Boolean value indicating whether the file or directory was removed successfully (true) or not (false).

Description

Method; removes the file or directory specified to by the File object. The method returns false if the file is open, the path points to a root folder, or the directory is not empty.

Example

The following if statement lets you execute code when myFileObject is removed:

if (myFileObject.remove()){
    // Do something here.
}