FilePathGetDirectories(String, String, SearchOption, ActionException) Method
Returns the names of the subdirectories (including their paths) that match the specified search pattern in the specified directory, and optionally searches subdirectories.
Namespace: Gemstone.IOAssembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.128 -- Release Build+d050cfc5563c89a1188cc3c6b2d417530856f490
public static string[] GetDirectories(
string path,
string searchPattern = "*",
SearchOption searchOption = SearchOption.AllDirectories,
Action<Exception>? exceptionHandler = null
)
Public Shared Function GetDirectories (
path As String,
Optional searchPattern As String = "*",
Optional searchOption As SearchOption = SearchOption.AllDirectories,
Optional exceptionHandler As Action(Of Exception) = Nothing
) As String()
public:
static array<String^>^ GetDirectories(
String^ path,
String^ searchPattern = L"*",
SearchOption searchOption = SearchOption::AllDirectories,
Action<Exception^>^ exceptionHandler = nullptr
)
Gemstone.IO.FilePath.GetDirectories = function(path, searchPattern, searchOption, exceptionHandler);
- path String
- The relative or absolute path to the directory to search. This string is not case-sensitive.
- searchPattern String (Optional)
- The search string to match against the names of subdirectories in path. This parameter can contain a combination of valid literal and wild-card characters, but doesn't support regular expressions.
- searchOption SearchOption (Optional)
- One of the enumeration values that specifies whether the search operation should include all subdirectories or only the current directory.
- exceptionHandler ActionException (Optional)
- Handles exceptions thrown during directory enumeration.
StringAn array of the full names (including paths) of the subdirectories that match the specified criteria, or an empty array if no directories are found.