recls C# mapping

FileSearch.Process Method (String, String, RECLS_FLAG, ProcessEntry, Int32)

Processes the matching entries by passing each one to the given delegate function

[Visual Basic]
Overloads Public Shared Function Process( _
   ByVal searchRoot As String, _
   ByVal pattern As String, _
   ByVal flags As RECLS_FLAG, _
   ByVal fn As ProcessEntry, _
   ByRef num As Integer _
) As Boolean
[C#]
public static bool Process(
   string searchRoot,
   string pattern,
   RECLS_FLAG flags,
   ProcessEntry fn,
   out int num
);

Parameters

searchRoot
The root directory of the search, e.g. "h:\recls". If it is null, or the empty string, the current directory of the calling process is used
pattern
The search pattern, e.g. "*.*. If it is null, or the empty string, all files are searched.
flags
Members of the RECLS_FLAG enumeration, to alter the search. For example, RECLS_F_DIRECTORIES causes directories to be retrieved; RECLS_F_RECURSIVE causes the search to recurse all subdirectories of searchRoot
fn
The delegate, of type Search.ProcessEntryProcessEntry, that will receive each matching item
num
The number of matching elements processed

Return Value

Returns true if the set of matching entries was processed to completion, or false if it was cancelled

Remarks

This static method conducts a search matching the given parameters, and calls the given delegate function for each matching item. The search is cancellable by means of return false from the delegate. The number of items reported is only those for which the delegate returned true; in other words, unvisited and cancelled entries are not counted.

See Also

FileSearch Class | recls Namespace | FileSearch.Process Overload List