wabbajack/Wabbajack.CLI/Verbs/DeleteFile.cs
2020-04-10 13:32:35 -05:00

21 lines
626 B
C#

using System;
using System.Threading.Tasks;
using CommandLine;
using Wabbajack.Lib.FileUploader;
namespace Wabbajack.CLI.Verbs
{
[Verb("delete-uploaded-file", HelpText = "Delete a file you uploaded to the CDN. Cannot delete other user's files")]
public class DeleteFile : AVerb
{
[Option('n', "name", Required = true, HelpText = @"Full name (as returned by my-files) of the file")]
public string Name { get; set; } = null!;
protected override async Task<ExitCode> Run()
{
Console.WriteLine(await AuthorAPI.DeleteFile(Name));
return 0;
}
}
}