wabbajack/Wabbajack.CLI/Verbs/DeleteFile.cs

21 lines
626 B
C#
Raw Normal View History

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")]
2020-04-10 01:29:53 +00:00
public string Name { get; set; } = null!;
2020-04-06 12:04:40 +00:00
2020-04-06 17:14:46 +00:00
protected override async Task<ExitCode> Run()
{
Console.WriteLine(await AuthorAPI.DeleteFile(Name));
return 0;
}
}
}