Files
SabreTools/SabreTools.FileTypes/BaseFile.cs

79 lines
1.9 KiB
C#
Raw Normal View History

namespace SabreTools.FileTypes
{
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>
public long? Size { get; set; }
2020-10-05 17:43:44 -07:00
/// <summary>
/// CRC32 hash of the file
/// </summary>
public byte[]? CRC { get; set; }
2020-10-05 17:43:44 -07:00
/// <summary>
/// MD5 hash of the file
/// </summary>
public byte[]? MD5 { get; set; }
2020-10-05 17:43:44 -07:00
/// <summary>
/// SHA-1 hash of the file
/// </summary>
public byte[]? SHA1 { get; set; }
2020-10-05 17:43:44 -07:00
/// <summary>
/// SHA-256 hash of the file
/// </summary>
public byte[]? SHA256 { get; set; }
2020-10-05 17:43:44 -07:00
/// <summary>
/// SHA-384 hash of the file
/// </summary>
public byte[]? SHA384 { get; set; }
2020-10-05 17:43:44 -07:00
/// <summary>
/// SHA-512 hash of the file
/// </summary>
public byte[]? SHA512 { get; set; }
2020-10-05 17:43:44 -07:00
/// <summary>
/// SpamSum fuzzy hash of the file
/// </summary>
public byte[]? SpamSum { get; set; }
#endregion
/// <summary>
/// Create a new BaseFile with no base file
/// </summary>
public BaseFile() { }
/// <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)
{
2024-10-19 23:17:37 -04:00
Filename = filename;
}
}
}