2024-04-16 20:33:16 +01:00
|
|
|
using System.ComponentModel;
|
2024-04-16 20:15:07 +01:00
|
|
|
using Spectre.Console.Cli;
|
|
|
|
|
|
|
|
namespace FindDuplicates;
|
|
|
|
|
|
|
|
internal sealed class ListSettings : CommandSettings
|
|
|
|
{
|
2024-04-17 14:35:30 +01:00
|
|
|
[CommandArgument(0, "[path]")]
|
|
|
|
[Description("The path to search. Defaults to the current directory.")]
|
|
|
|
[DefaultValue(".")]
|
|
|
|
public string InputPath { get; set; } = ".";
|
2024-04-16 20:15:07 +01:00
|
|
|
|
2024-04-17 16:11:01 +01:00
|
|
|
[CommandOption("-a|--algorithm <algorithm>")]
|
|
|
|
[Description("The hash algorithm used for comparison. Defaults to SHA512. For a list of all available algorithms, run fdup alglist")]
|
|
|
|
[DefaultValue(Algorithm.Sha512)]
|
|
|
|
public Algorithm Algorithm { get; set; } = Algorithm.Sha512;
|
|
|
|
|
2024-04-16 20:15:07 +01:00
|
|
|
[CommandOption("-r|--recursive")]
|
2024-04-17 16:09:25 +01:00
|
|
|
[Description("Scans the directory recursively. This may increase run time and is not advised to use when at high order directories such as C: or /")]
|
2024-04-16 20:15:07 +01:00
|
|
|
[DefaultValue(false)]
|
|
|
|
public bool Recursive { get; set; } = false;
|
2024-04-17 14:17:56 +01:00
|
|
|
|
|
|
|
[CommandOption("--verbose")]
|
|
|
|
[Description("Enable verbose output.")]
|
|
|
|
[DefaultValue(false)]
|
|
|
|
public bool Verbose { get; set; } = false;
|
2024-04-16 20:15:07 +01:00
|
|
|
}
|