using System.Collections.Generic; namespace SabreTools.Data.Models.ISO9660 { /// /// A volume (or disc image) with a ISO9660 / ECMA-119 filesystem /// A set of volumes (set of disc images) makes up an entire file system (files may be spread across volumes/discs) /// Note: Volume can be accessed in logical sectors, usually 2048 bytes, but can be other higher powers of 2 /// Note: Volume is made up of logical blocks, usually 2048 bytes, but can be any power of two (minimum 512 / 2^9) /// The logical block size cannot be smaller than the logical sector size /// /// public sealed class Volume { /// /// System Area, made up of 16 logical blocks /// 32,768 bytes, assuming logical block size of 2048 bytes /// ISO9660 does not specify the content of the System Area /// public byte[] SystemArea { get; set; } = []; #region Data Area /// /// Set of Volume Descriptors /// Valid ISO9660 volumes have: /// - At least one Primary Volume Descriptor (Type = 1) /// - Zero or more Supplementary/Enhanced Volume Descriptors (Type = 2) /// - Zero or more Volume Partition Descriptors (Type = 3) /// - Zero or more Boot Volume Descriptors (Type = 0) /// - At least one Volume Descriptor Set Terminator (Type = 255), as the final element(s) in the set /// public VolumeDescriptor[] VolumeDescriptorSet { get; set; } = []; /// /// List of path table records for each directory on the volume /// One (or two) Path Table Groups is provided for each Base Volume Descriptor /// Note: If a Base Volume Descriptor's Path Table Size field is ambiguous, two Path Table Groups may be given /// public PathTableGroup[] PathTableGroups { get; set; } = []; /// /// Map of sector numbers and the directory at that sector number /// Each Directory contains child directory and file descriptors /// Note: FileExtent is the base class for DirectoryExtent /// public Dictionary DirectoryDescriptors { get; set; } = []; #endregion } }