Directory.GetDirectories Method (String, String)
Gets an array of directories (including their paths) that match the specified search pattern in the current directory.
Assembly: mscorlib (in mscorlib.dll)
'Declaration Public Shared Function GetDirectories ( _ path As String, _ searchPattern As String _ ) As String()
- Type: System.String
The path to search.
Return ValueType: System.String ()
A String array of directories matching the search pattern.
The caller does not have the required permission.
path is a zero-length string, contains only white space, or contains one or more invalid characters.
searchPattern does not contain a valid pattern.
path or searchPattern is Nothing.
The specified path, file name, or both exceed the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters and file names must be less than 260 characters.
path is a file name.
The specified path is invalid (for example, it is on an unmapped drive).