Add list files remote command

This commit is contained in:
Stone_Red
2023-12-14 00:03:42 +01:00
parent 6f8d15ec88
commit e20d133936
5 changed files with 106 additions and 2 deletions
@@ -0,0 +1,23 @@
using System.Text.Json.Serialization;
namespace HyperbolicDownloaderApi.FileProcessing;
internal class HyperFileDto
{
public string Hash { get; set; }
public string Name { get; set; }
[JsonConstructor]
public HyperFileDto(string hash, string name)
{
Hash = hash;
Name = name;
}
public HyperFileDto(PrivateHyperFileInfo privateHyperFileInfo)
{
Hash = privateHyperFileInfo.Hash;
Name = Path.GetFileName(privateHyperFileInfo.FilePath);
}
}