| Previous | Next | |
STF.listFiles(folderName:String) : ArrayfolderName - Name (including the path) of the folder for which the files list should be returned.
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.
Method; Lists all files contained in the specified folder.
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);| Questions or Feedback? | Previous | Next |