Io HelperCopy Directory With Replace Marker 方法
复制目录并替换文件内容并从该标记开始保留内容
如果需要指定跳过的文件,必须使用全名
Definition
命名空间: Suresking.Utility
程序集: Suresking.Utility (在 Suresking.Utility.dll 中) 版本:1.3.22+a27276bb8ffde055e69ff608e98aafba279e1e99
操作结果状态
程序集: Suresking.Utility (在 Suresking.Utility.dll 中) 版本:1.3.22+a27276bb8ffde055e69ff608e98aafba279e1e99
C#
public static ResultStatus CopyDirectoryWithReplaceMarker(
string sourceDir,
string targetDir,
string searchPattern = "*.cs",
IEnumerable<ReplacePair>? replacePairs = null,
SearchOption searchOption = SearchOption.AllDirectories,
HashSet<string>? startMarkers = null,
HashSet<string>? ignoreFiles = null
)参数
- sourceDir String
- 源目录
- targetDir String
- 目标目录
- searchPattern String (Optional)
- 文件搜索模式,默认 "*.cs"
- replacePairs IEnumerableReplacePair (Optional)
- 替换对列表
- searchOption SearchOption (Optional)
- 搜索选项,默认 AllDirectories
- startMarkers HashSetString (Optional)
- 起始标记集合,从该标记开始保留内容,支持多个标记
- ignoreFiles HashSetString (Optional)
- 要跳过的文件列表,全文件名匹配
返回值
ResultStatus操作结果状态