mFile.folderExists()

Availability

Windows: Flash 8 or 9 AS2.0 swf + mProjector 3.1.0

Macintosh: Flash 8 or 9 AS2.0 SWF + mProjector 3.1.0;

Usage

mFile.folderExists() : Boolean

Parameters

None.

Returns

A boolean.; ; The value is true if the path is a file or a folder. Use mFile.isFolder() if it is necessary to determine whether the path is a file or folder.

Description

Method; Checks for the existance of the specified folder.

Example

The following example creates a temp dir if one doesn't already exist.

var pathDelimiter:String = mSystem.getPathDelimiter();
var applicationDir:String = mSystem.getSpecialFolder("MYAPP");
var tempDir:String = applicationDir + pathDelimiter + "temp";
var foundTempDir:Boolean = mFile.folderExists("tempDir");
if (!foundTempDir) {
    mFile.createFolder(tempDir);
}

See Also

mFile.isFolder()