2025-01-04 21:17:02 -05:00
|
|
|
|
namespace SabreTools.FileTypes
|
2018-02-15 22:06:20 -08:00
|
|
|
|
{
|
2019-02-08 20:51:44 -08:00
|
|
|
|
public class BaseFile
|
|
|
|
|
|
{
|
2020-10-05 17:43:44 -07:00
|
|
|
|
#region Fields
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Filename or path to the file
|
|
|
|
|
|
/// </summary>
|
2024-02-28 19:19:50 -05:00
|
|
|
|
public string? Filename { get; set; }
|
2020-10-05 17:43:44 -07:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Direct parent of the file
|
|
|
|
|
|
/// </summary>
|
2024-02-28 19:19:50 -05:00
|
|
|
|
public string? Parent { get; set; }
|
2020-10-05 17:43:44 -07:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Date stamp of the file
|
|
|
|
|
|
/// </summary>
|
2024-02-28 19:19:50 -05:00
|
|
|
|
public string? Date { get; set; }
|
2020-10-05 17:43:44 -07:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Optional size of the file
|
|
|
|
|
|
/// </summary>
|
2019-02-08 20:51:44 -08:00
|
|
|
|
public long? Size { get; set; }
|
2020-10-05 17:43:44 -07:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// CRC32 hash of the file
|
|
|
|
|
|
/// </summary>
|
2025-01-04 21:17:02 -05:00
|
|
|
|
public byte[]? CRC { get; set; }
|
2020-10-05 17:43:44 -07:00
|
|
|
|
|
2025-01-09 05:26:36 -05:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// MD2 hash of the file
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public byte[]? MD2 { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// MD4 hash of the file
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public byte[]? MD4 { get; set; }
|
|
|
|
|
|
|
2020-10-05 17:43:44 -07:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// MD5 hash of the file
|
|
|
|
|
|
/// </summary>
|
2025-01-04 21:17:02 -05:00
|
|
|
|
public byte[]? MD5 { get; set; }
|
2020-10-05 17:43:44 -07:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// SHA-1 hash of the file
|
|
|
|
|
|
/// </summary>
|
2025-01-04 21:17:02 -05:00
|
|
|
|
public byte[]? SHA1 { get; set; }
|
2020-10-05 17:43:44 -07:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// SHA-256 hash of the file
|
|
|
|
|
|
/// </summary>
|
2025-01-04 21:17:02 -05:00
|
|
|
|
public byte[]? SHA256 { get; set; }
|
2020-10-05 17:43:44 -07:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// SHA-384 hash of the file
|
|
|
|
|
|
/// </summary>
|
2025-01-04 21:17:02 -05:00
|
|
|
|
public byte[]? SHA384 { get; set; }
|
2020-10-05 17:43:44 -07:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// SHA-512 hash of the file
|
|
|
|
|
|
/// </summary>
|
2025-01-04 21:17:02 -05:00
|
|
|
|
public byte[]? SHA512 { get; set; }
|
2020-10-05 17:43:44 -07:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// SpamSum fuzzy hash of the file
|
|
|
|
|
|
/// </summary>
|
2025-01-04 21:17:02 -05:00
|
|
|
|
public byte[]? SpamSum { get; set; }
|
2019-02-08 20:51:44 -08:00
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Create a new BaseFile with no base file
|
|
|
|
|
|
/// </summary>
|
2025-01-04 21:17:02 -05:00
|
|
|
|
public BaseFile() { }
|
2019-02-08 20:51:44 -08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Create a new BaseFile from the given file
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="filename">Name of the file to use</param>
|
2025-01-04 20:24:56 -05:00
|
|
|
|
public BaseFile(string filename)
|
2019-02-08 20:51:44 -08:00
|
|
|
|
{
|
2024-10-19 23:17:37 -04:00
|
|
|
|
Filename = filename;
|
2019-02-08 20:51:44 -08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2018-02-15 22:06:20 -08:00
|
|
|
|
}
|