mirror of
https://github.com/nsnail/dot.git
synced 2025-06-17 21:13:21 +08:00
<fix>
This commit is contained in:
parent
0594ec1836
commit
14d72106cd
@ -15,11 +15,6 @@ public abstract class FilesTool<TOption> : ToolBase<TOption> where TOption : Dir
|
|||||||
private int _writeCnt; //写入文件数
|
private int _writeCnt; //写入文件数
|
||||||
private readonly ConcurrentDictionary<string, int> _writeStats = new(); //写入统计:后缀,数量
|
private readonly ConcurrentDictionary<string, int> _writeStats = new(); //写入统计:后缀,数量
|
||||||
|
|
||||||
protected FilesTool()
|
|
||||||
{
|
|
||||||
if (!Directory.Exists(Opt.Path))
|
|
||||||
throw new ArgumentException(nameof(Opt.Path), string.Format(Str.PathNotFound, Opt.Path));
|
|
||||||
}
|
|
||||||
|
|
||||||
private string[] EnumerateFiles(string path, string searchPattern, out int excludeCnt)
|
private string[] EnumerateFiles(string path, string searchPattern, out int excludeCnt)
|
||||||
{
|
{
|
||||||
@ -47,6 +42,9 @@ public abstract class FilesTool<TOption> : ToolBase<TOption> where TOption : Dir
|
|||||||
|
|
||||||
protected override async Task Core()
|
protected override async Task Core()
|
||||||
{
|
{
|
||||||
|
if (!Directory.Exists(Opt.Path))
|
||||||
|
throw new ArgumentException(nameof(Opt.Path), string.Format(Str.PathNotFound, Opt.Path));
|
||||||
|
|
||||||
if (!Opt.WriteMode) AnsiConsole.MarkupLine("[gray]{0}[/]", Str.ExerciseMode);
|
if (!Opt.WriteMode) AnsiConsole.MarkupLine("[gray]{0}[/]", Str.ExerciseMode);
|
||||||
IEnumerable<string> fileList;
|
IEnumerable<string> fileList;
|
||||||
await AnsiConsole.Progress()
|
await AnsiConsole.Progress()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user