Directory: GetDirectories

GetDirectories

Returns a list of all the directories found in the specified directory that matches the search pattern.



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

Parameters

Path
[ByRef] String. The directory to find the requested directories.
SearchPattern
[ByRef] Optional. String. A pattern to compare all the directories against, returning those that match the pattern.  

Default: "*"

SearchOption
[ByVal] 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() -  An array of the matching directories. If no directories match the pattern, then an empty zero-length array.

Remarks

The path can be absolute or relative.

See Also

Project CorLib Overview

Class Directory Overview