FilePathEnumerateDirectories(DirectoryInfo, String, SearchOption, ActionException) Method
Returns an enumerable collection of subdirectories that match a search pattern in a specified path, and optionally searches subdirectories.
Namespace: Gemstone.IOAssembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.128 -- Release Build+d050cfc5563c89a1188cc3c6b2d417530856f490
public static IEnumerable<DirectoryInfo> EnumerateDirectories(
DirectoryInfo directory,
string searchPattern = "*",
SearchOption searchOption = SearchOption.AllDirectories,
Action<Exception>? exceptionHandler = null
)
Public Shared Function EnumerateDirectories (
directory As DirectoryInfo,
Optional searchPattern As String = "*",
Optional searchOption As SearchOption = SearchOption.AllDirectories,
Optional exceptionHandler As Action(Of Exception) = Nothing
) As IEnumerable(Of DirectoryInfo)
public:
static IEnumerable<DirectoryInfo^>^ EnumerateDirectories(
DirectoryInfo^ directory,
String^ searchPattern = L"*",
SearchOption searchOption = SearchOption::AllDirectories,
Action<Exception^>^ exceptionHandler = nullptr
)
Gemstone.IO.FilePath.EnumerateDirectories = function(directory, searchPattern, searchOption, exceptionHandler);
- directory DirectoryInfo
- The directory to search.
- searchPattern String (Optional)
- The search string to match against the names of subdirectories in the directory. This parameter can contain a combination of valid literal and wildcard characters, but doesn't support regular expressions.
- searchOption SearchOption (Optional)
- One of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories.
- exceptionHandler ActionException (Optional)
- Handles exceptions thrown during directory enumeration.
IEnumerableDirectoryInfoAn enumerable collection of the
DirectoryInfo objects representing the subdirectories that match the specified search criteria.