// /*************************************************************************** // Aaru Data Preservation Suite // ---------------------------------------------------------------------------- // // Filename : Structs.cs // Author(s) : Natalia Portillo // // Component : U.C.S.D. Pascal filesystem plugin. // // --[ Description ] ---------------------------------------------------------- // // U.C.S.D. Pascal filesystem structures. // // --[ License ] -------------------------------------------------------------- // // This library is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as // published by the Free Software Foundation; either version 2.1 of the // License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, see . // // ---------------------------------------------------------------------------- // Copyright © 2011-2025 Natalia Portillo // ****************************************************************************/ using System.Diagnostics.CodeAnalysis; using Aaru.CommonTypes.Interfaces; namespace Aaru.Filesystems; // Information from Call-A.P.P.L.E. Pascal Disk Directory Structure [SuppressMessage("ReSharper", "NotAccessedField.Local")] public sealed partial class PascalPlugin { #region Nested type: PascalDirNode sealed class PascalDirNode : IDirNode { internal string[] Contents; internal int Position; #region IDirNode Members /// public string Path { get; init; } #endregion } #endregion #region Nested type: PascalFileEntry struct PascalFileEntry { /// 0x00, first block of file public short FirstBlock; /// 0x02, last block of file public short LastBlock; /// 0x04, entry type public PascalFileKind EntryType; /// 0x06, file name public byte[] Filename; /// 0x16, bytes used in last block public short LastBytes; /// 0x18, modification time public short ModificationTime; } #endregion #region Nested type: PascalFileNode sealed class PascalFileNode : IFileNode { internal byte[] Cache; #region IFileNode Members /// public string Path { get; init; } /// public long Length { get; init; } /// public long Offset { get; set; } #endregion } #endregion #region Nested type: PascalVolumeEntry struct PascalVolumeEntry { /// 0x00, first block of volume entry public short FirstBlock; /// 0x02, last block of volume entry public short LastBlock; /// 0x04, entry type public PascalFileKind EntryType; /// 0x06, volume name public byte[] VolumeName; /// 0x0E, block in volume public short Blocks; /// 0x10, files in volume public short Files; /// 0x12, dummy public short Dummy; /// 0x14, last booted public short LastBoot; /// 0x16, tail to make record same size as public int Tail; } #endregion }