ssCore.FileSys.findFiles

Search the file system for files with names matching a pattern.


Availability:

First available in version 3.0 build 2039.


Input Parameters:

path - A fully qualified path to a directory to search. This parameter supports monikers.

subfolders - [Optional] - A flag that indicates whether to search subfolders of the target path or not. Valid values include: true,false. Default value is false.

filter - [Optional] - A pattern mask that is used to determine if a file should be included in the search results. Default value is *.*.

delimiter - [Optional] - Character(s) to be used as a delimiter between files in the results. Default value is |.

showHidden - [Optional] - A flag that indicates whether to return hidden files or not Valid values include: true,false. Default value is false.


Output Parameters:

result - List of files.


Asynchronous Mode:

When this method is called asynchronously, a return object containing the output parameters is passed to the specified callback function.

ssCore.FileSys.findFiles( paramsObject [, callbackParamsObject] [, errorParamsObject] );


Synchronous Mode:

When this method is called synchronously, a return object containing the output parameters is returned to the caller immediately.

var returnObject = ssCore.FileSys.findFiles( paramsObject );


Notes:

None.

                

Examples:

The following example gets a list of all files in a given folder that has the .mp3 extension and displays the result in the SWF Studio Trace tab.

var return_obj = ssCore.FileSys.findFiles({path:"startdir://", subfolders:true, filter:"*.mp3"});

ssDebug.trace(return_obj.result);