-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
33 lines (22 loc) · 801 Bytes
/
Copy pathProgram.cs
File metadata and controls
33 lines (22 loc) · 801 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using CommandLine;
using NetCleaner;
using NetCleaner.Services;
#if DEBUG
// Test non-existence
// args = new[] { "-r", @"D:\Temp\something-not-exists" };
// Test for WhatIf
// args = new[] { "-r", @"D:\Temp\TestCleaner", "-s" };
// Actually delete files, be careful
// args = new[] { "-r", @"D:\Temp\TestCleaner", "-s", "-d" };
// Show help
// args = new[] { "-h" };
// Test root folder (for inaccessible folders)
// args = new[] { "-r", @"D:\", "-s", };
// Test root folder with ignored folder (for inaccessible folders)
// args = new[] { "-r", @"D:\", "-s", "-i", "System Volume Information" };
#endif
CommandLineOptions? o = null;
Parser.Default.ParseArguments<CommandLineOptions>(args)
.WithParsed(parsed => o = parsed);
if (o is null) { return; }
new CleanerService().Clean(o);