UtilDirectoryGetDirPaths(String, SearchOption, IEnumerableString, IEnumerableString, Boolean, Boolean) Method
Gets the filepaths those matches the criteria inside the specified directory and/or sub-DirectoryUtil.
Namespace: DevCase.Core.IO.FileSystemAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static IEnumerable<string> GetDirPaths(
string dirPath,
SearchOption searchOption,
IEnumerable<string> dirPathPatterns = null,
IEnumerable<string> dirNamePatterns = null,
bool ignoreCase = true,
bool throwOnError = false
)
Public Shared Function GetDirPaths (
dirPath As String,
searchOption As SearchOption,
Optional dirPathPatterns As IEnumerable(Of String) = Nothing,
Optional dirNamePatterns As IEnumerable(Of String) = Nothing,
Optional ignoreCase As Boolean = true,
Optional throwOnError As Boolean = false
) As IEnumerable(Of String)
Dim dirPath As String
Dim searchOption As SearchOption
Dim dirPathPatterns As IEnumerable(Of String)
Dim dirNamePatterns As IEnumerable(Of String)
Dim ignoreCase As Boolean
Dim throwOnError As Boolean
Dim returnValue As IEnumerable(Of String)
returnValue = UtilDirectory.GetDirPaths(dirPath,
searchOption, dirPathPatterns, dirNamePatterns,
ignoreCase, throwOnError)
public:
static IEnumerable<String^>^ GetDirPaths(
String^ dirPath,
SearchOption searchOption,
IEnumerable<String^>^ dirPathPatterns = nullptr,
IEnumerable<String^>^ dirNamePatterns = nullptr,
bool ignoreCase = true,
bool throwOnError = false
)
static member GetDirPaths :
dirPath : string *
searchOption : SearchOption *
?dirPathPatterns : IEnumerable<string> *
?dirNamePatterns : IEnumerable<string> *
?ignoreCase : bool *
?throwOnError : bool
(* Defaults:
let _dirPathPatterns = defaultArg dirPathPatterns null
let _dirNamePatterns = defaultArg dirNamePatterns null
let _ignoreCase = defaultArg ignoreCase true
let _throwOnError = defaultArg throwOnError false
*)
-> IEnumerable<string>
No code example is currently available or this language may not be supported.
- dirPath String
-
The root directory path to search for DirectoryUtil.
- searchOption SearchOption
-
The searching mode.
- dirPathPatterns IEnumerableString (Optional)
-
The directory path pattern(s) to match.
- dirNamePatterns IEnumerableString (Optional)
-
The directory name pattern(s) to match.
- ignoreCase Boolean (Optional)
-
If , ignores the comparing case of dirPathPatterns and dirNamePatterns patterns.
- throwOnError Boolean (Optional)
-
If set to , exceptions will be thrown, like access denied to directory.
IEnumerableString
An
IEnumerableT instance containing the directory paths.
This is a code example.
No code example is currently available or this language may not be supported.
Dim dirPaths As List(Of String) =
GetDirPaths("C:\Windows\System32", SearchOption.AllDirectories).ToList
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
ArgumentException
|
dirPath or searchOption
|