Directory: GetFileSystemEntries

GetFileSystemEntries

Returns both directories and files that match the specified pattern.



 Public Function GetFileSystemEntries(
	  ByRef Path As String,
	  Optional ByRef SearchPattern As String = "*",
	  Optional SearchOption As SearchOption = TopDirectoryOnly ) As String ( )

Parameters

Path
[ByRef] String. The directory to search for the files and directories.
SearchPattern
[ByRef] Optional. String. The pattern the filenames and directories must match.  

Default: "*"

SearchOption
[ByRef] Optional. SearchOption. One of the enumeration values that specifies whether the search operation should include all subdirectories or only the current directory.  

Default: TopDirectoryOnly

Return Values

String() -  The list of files and directories that matched the pattern. If no files or directories matched the pattern, then an empty, zero-length array is returned.

Remarks

The path can be absolute or relative.

See Also

Project CorLib Overview

Class Directory Overview