 | DirExGetDirectories 方法 |
Sweet 开发框架
获取指定目录中的匹配目录
命名空间:
Sweet.Common
程序集:
Sweet.Common (在 Sweet.Common.dll 中) 版本:3.10.1.0 (3.10.1.0)
语法public static string[] GetDirectories(
string dir,
string regexPattern = null,
int depth = 0,
bool throwEx = false
)
Public Shared Function GetDirectories (
dir As String,
Optional regexPattern As String = Nothing,
Optional depth As Integer = 0,
Optional throwEx As Boolean = false
) As String()
static member GetDirectories :
dir : string *
?regexPattern : string *
?depth : int *
?throwEx : bool
(* Defaults:
let _regexPattern = defaultArg regexPattern null
let _depth = defaultArg depth 0
let _throwEx = defaultArg throwEx false
*)
-> string[]
参数
- dir
- 类型:SystemString
要搜索的目录 - regexPattern (Optional)
- 类型:SystemString
目fu录名模式(正则)。null表示忽略模式匹配,返回所有目录 - depth (Optional)
- 类型:SystemInt32
递归深度。负数表示不限,0表示仅顶级 - throwEx (Optional)
- 类型:SystemBoolean
是否抛异常
返回值
类型:
String结果
参见