directory class : GetDirectories(string) method
Description
Gets a list of subdirectories that match to the specified pattern.
Syntax
directoryInstance.GetDirectories(string pattern)
Arguments
Class | Name | Description |
string | pattern | Search pattern. |
Return value
Class | Description |
list{directory} | A list of subdirectories that matches to the specified pattern. |
Sample code
1: | directory dir = new directory("c:\somewhere..."); |
2: | list{directory} subDirectories = dir.GetDirectories("c*"); // Subdirectories that starts with "c". |
Notes
It's a wrapper of the System.IO.DirectoryInfo.GetDirectories(String) method.
Please note that this method do not work recursively. It returns a list of direct children.