2020-03-02 23:16:15 +00:00
|
|
|
|
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-06 12:04:40 +00:00
|
|
|
|
public string? Name { get; set; }
|
|
|
|
|
|
2020-04-06 17:14:46 +00:00
|
|
|
|
protected override async Task<ExitCode> Run()
|
2020-03-02 23:16:15 +00:00
|
|
|
|
{
|
|
|
|
|
Console.WriteLine(await AuthorAPI.DeleteFile(Name));
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|