using System.Runtime.InteropServices; namespace SabreTools.Data.Models.Steam2Installer { public sealed class FileEntry { /// /// Offset of the filename in the string bytes array /// public uint NameOffset { get; set; } /// /// Offset of the path name in the string bytes array /// public uint PathOffset { get; set; } /// /// Steam depot id of the depot the file is a part of /// public uint DepotId { get; set; } /// /// Offset of the file within its sid volume /// public ulong Offset { get; set; } /// /// Size of the file, in bytes /// public ulong Size { get; set; } /// /// Which # installer disc the file is on /// public byte DiscNumber { get; set; } /// /// Which # sid volume the file is in /// public byte VolumeNumber { get; set; } /// /// Whether the file is encrypted or not /// /// /// This flag isn't entirely reliable, as sometimes the file is encrypted in the sid without this /// flag being set in the sid. The reverse is not currently known to be true, though, so there at /// least shouldn't be any false positives when using this flag. /// public bool Encrypted { get; set; } /// /// Unknown 1-byte value, likely just padding /// public byte Unknown { get; set; } // The filename and path aren't stored in the fileentry structure in the .sim, but the offsets are, // so it just makes sense to also parse and store the strings for the file here too. /// /// The filename /// public string Name { get; set; } = string.Empty; /// /// The file path /// public string Path { get; set; } = string.Empty; } }