-
Notifications
You must be signed in to change notification settings - Fork 0
/
CmdOptions.cs
43 lines (33 loc) · 1.56 KB
/
CmdOptions.cs
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
34
35
36
37
38
39
40
41
42
43
//Copyright 2021 Niko Rosvall <[email protected]>
using System;
using System.IO;
using CommandLine;
namespace SECRET
{
[Verb("encrypt", HelpText = "Encrypt files or directories.")]
internal class EncryptOption
{
[Option('f', "file", Required = true, HelpText = "File to be encrypted.", SetName = "file")]
public string InputFileToEncrypt { get; set; }
[Option('d', "directory", Required = true, HelpText = "Directory to be encrypted.", SetName="dir")]
public string InputDirToEncrypt { get; set; }
[Option('r', "recursive", Default = false, HelpText = "Recursive encryption, only used with --directory",
SetName="dir")]
public bool Recursive { get; set; }
[Option(Default = false, HelpText = "Delete original file(s).")]
public bool Delete { get; set; }
}
[Verb("decrypt", HelpText = "Decrypt files or directories.")]
internal class DecryptOption
{
[Option('f', "file", Required=true, HelpText = "File to be decrypted.", SetName = "file")]
public string InputFileToDecrypt { get; set; }
[Option('d', "directory", Required = true, HelpText = "Directory to be decrypted.", SetName = "dir")]
public string InputDirToDecrypt { get; set; }
[Option('r', "recursive", Default = false, HelpText = "Recursive decryption, only used with --directory",
SetName = "dir")]
public bool Recursive { get; set; }
[Option(Default = false, HelpText = "Delete original file(s).")]
public bool Delete { get; set; }
}
}