Share via


Directory.GetDirectories Method

Gets an array of directories matching the specified search pattern from the current directory.

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)

Syntax

public static string GetDirectories (
         stringpath,
         stringsearchPattern
)

Parameters

  • path
    The path to search.
  • searchPattern
    The search string to match against the names of files in path. The parameter cannot end in two periods ("..") or contain two periods ("..") followed by DirectorySeparatorChar or AltDirectorySeparatorChar, nor can it contain any of the characters in InvalidPathChars.

Return Value

A String array of directories matching the search pattern.

Version Information

Available in the .NET Micro Framework versions 3.0, 4.0, and 4.1.

See Also

Reference

Directory Class
Directory Members
System.IO Namespace