STF.listFiles()

Availability

Flash AS2.0 SWF w/ ScreenTimeScreenSaver component + ScreenTime 3.0 / 3.0

Usage

STF.listFiles(folderName:String) : Array

Parameters

folderName - Name (including the path) of the folder for which the files list should be returned.

Returns

An array.; ; This value is returned as a parameter to the registered callback. See the example below or STF.registerCallBack() for more information on return variable handling.

Description

Method; Lists all files contained in the specified folder.

Example

The following example lists all files from a folder.

var Files;
listFiles_btn.onRelease = function() {
	mFile.listFiles(desktopFolderPath);
}
//define the callback
function listOfFilesCallback(returnValue:Array){
	Files = returnValue;
	for (var i=0; Files[i]; i++)
	{
    trace(Files[i]);
	}
}
//register the callback
mFile.registerCallBack("listFiles", listOfFilesCallback, this);

See Also

STF.listFolders()