ssCore.FileSys.findInFiles

Search the file system for files containing the specified text.


Availability:

First available in version 3.0 build 2039.


Input Parameters:

text - A string to search for (not case sensitive).

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. Default value is *.*.

delimiter - [Optional] - Character 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.findInFiles( 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.findInFiles( paramsObject );


Notes:

Only files that contain the text string (anywhere in the file) will be returned.

The search is not case sensitive.

                

Examples:

The following example looks for the specified text in all .as files in a Classes folder and displays the list of files in the SWF Studio Trace tab.

var return_obj = ssCore.FileSys.findInFiles({text:"function launchMyApp()", path:"startdir://Classes", subfolders:true, filter:"*.as"});

ssDebug.trace(return_obj.result);