recls C# mapping

FileSearch Constructor 

Creates a search for the items identified by pattern in the directory rootDir, according to the given flags.

[Visual Basic]
Public Sub New( _
   ByVal searchRoot As String, _
   ByVal pattern As String, _
   ByVal flags As RECLS_FLAG _
public FileSearch(
   string searchRoot,
   string pattern,
   RECLS_FLAG flags


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
The search pattern, e.g. "*.*. If it is null, or the empty string, all files are searched.
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


No search is conducted at the time of construction of a FileSearch instance. Hence, no search-specific errors will be reported at this time. Only when the enumeration is conducted on the IEnumerator returned by the GetEnumerator method will such errors occur.

See Also

FileSearch Class | recls Namespace