Click or drag to resize

FilePathEnumerateDirectories(String, String, SearchOption, ActionException) Method

Returns an enumerable collection of file names that match a search pattern in a specified path, and optionally searches subdirectories.

Namespace: GSF.IO
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.207-beta+1781b796b2aa7a54013a031eb432fe4ccee31867
Syntax
public static IEnumerable<string> EnumerateDirectories(
	string path,
	string searchPattern = "*",
	SearchOption searchOption = SearchOption.AllDirectories,
	Action<Exception> exceptionHandler = null
)
View Source

Parameters

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 directories in path. This parameter can contain a combination of valid literal path and wildcard (* and ?) 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.

Return Value

IEnumerableString
An enumerable collection of the full names (including paths) for the directories in the directory specified by path and that match the specified search pattern and option.
See Also