|
FilePath.EnumerateFiles(DirectoryInfo, String, SearchOption, Action<Exception> ) Method
|
Returns an enumerable collection of files that match a search pattern in a specified path, and optionally searches subdirectories.
Namespace: GSF.IOAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.230-beta+03417d7b5cff037b24e882d7adef82d359b34964
SyntaxGSF.IO.FilePath.EnumerateFiles = function(directory, searchPattern, searchOption, exceptionHandler);
View SourceParameters
- directory DirectoryInfo
- The directory to search.
- searchPattern String (Optional)
- The search string to match against the names of files in the directory. 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 Action<Exception> (Optional)
- Handles exceptions thrown during file enumeration.
Return Value
IEnumerable<FileInfo>An enumerable collection of the
FileInfo objects representing the files in the specified directory that match the specified search pattern, or an empty array if no files are found.
See Also