mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
23 lines
594 B
C#
23 lines
594 B
C#
using System;
|
|
using System.Threading.Tasks;
|
|
using CommandLine;
|
|
using Wabbajack.Common;
|
|
|
|
namespace Wabbajack.CLI.Verbs
|
|
{
|
|
[Verb("hash-file", HelpText = "Hash a file and print the result")]
|
|
public class HashFile : AVerb
|
|
{
|
|
|
|
[Option('i', "input", Required = true, HelpText = "Input file name")]
|
|
public string Input { get; set; } = "";
|
|
|
|
protected override async Task<ExitCode> Run()
|
|
{
|
|
var abs = (AbsolutePath)Input;
|
|
Console.WriteLine($"{abs} hash: {await abs.FileHashAsync()}");
|
|
return ExitCode.Ok;
|
|
}
|
|
}
|
|
}
|