FilePathGetFiles(String, String, SearchOption, ActionException) Method

Returns the names of files (including their paths) that match the specified search pattern in the specified directory, using a value to determine whether to search subdirectories.

Definition

Namespace: Gemstone.IO
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.175 -- Release Build+70cfebd19f80455d07e1cf93607e59f6af0e38f4
public static string[] GetFiles(
	string path,
	string searchPattern = "*",
	SearchOption searchOption = SearchOption.AllDirectories,
	Action<Exception>? exceptionHandler = null
)

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 files in path. This parameter can contain a combination of valid literal path and wild-card (* and ?) 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 file enumeration.

Return Value

String
An array of the full names (including paths) for the files in the specified directory that match the specified search pattern and option, or an empty array if no files are found.

See Also