Files
Aaru/Aaru.Filesystems/ISO9660/Structs/Internal.cs

157 lines
5.3 KiB
C#
Raw Normal View History

// /***************************************************************************
2020-02-27 12:31:25 +00:00
// Aaru Data Preservation Suite
// ----------------------------------------------------------------------------
//
2019-07-31 20:10:27 +01:00
// Filename : Internal.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : ISO9660 filesystem plugin.
//
// --[ 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 <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
2024-12-19 10:45:18 +00:00
// Copyright © 2011-2025 Natalia Portillo
// In the loving memory of Facunda "Tata" Suárez Domínguez, R.I.P. 2019/07/24
// ****************************************************************************/
2017-12-19 19:33:46 +00:00
using System;
using System.Collections.Generic;
using Aaru.CommonTypes.Interfaces;
namespace Aaru.Filesystems;
2022-03-06 13:29:38 +00:00
public sealed partial class ISO9660
{
#region Nested type: DecodedDirectoryEntry
2022-11-15 01:35:06 +00:00
sealed class DecodedDirectoryEntry
2022-03-06 13:29:38 +00:00
{
public byte[] AmigaComment;
public AmigaProtection? AmigaProtection;
public byte? AppleDosType;
public byte[] AppleIcon;
public ushort? AppleProDosType;
public DecodedDirectoryEntry AssociatedFile;
public CdiSystemArea? CdiSystemArea;
public List<(uint extent, uint size)> Extents;
public string Filename;
public byte FileUnitSize;
public AppleCommon.FInfo? FinderInfo;
public FileFlags Flags;
public byte Interleave;
public PosixAttributes? PosixAttributes;
public PosixAttributesOld? PosixAttributesOld;
public PosixDeviceNumber? PosixDeviceNumber;
public DecodedDirectoryEntry ResourceFork;
public byte[] RockRidgeAlternateName;
public bool RockRidgeRelocated;
public byte[] RripAccess;
public byte[] RripAttributeChange;
public byte[] RripBackup;
public byte[] RripCreation;
public byte[] RripEffective;
public byte[] RripExpiration;
public byte[] RripModify;
public ulong Size;
public string SymbolicLink;
public DateTime? Timestamp;
public ushort VolumeSequenceNumber;
2022-11-13 20:38:15 +00:00
// ReSharper disable once InconsistentNaming
public CdromXa? XA;
public byte XattrLength;
2022-03-06 13:29:38 +00:00
public override string ToString() => Filename;
}
#endregion
#region Nested type: DecodedVolumeDescriptor
struct DecodedVolumeDescriptor
2022-03-06 13:29:38 +00:00
{
public string SystemIdentifier;
public string VolumeIdentifier;
public string VolumeSetIdentifier;
public string PublisherIdentifier;
public string DataPreparerIdentifier;
public string ApplicationIdentifier;
public DateTime CreationTime;
public bool HasModificationTime;
public DateTime ModificationTime;
public bool HasExpirationTime;
public DateTime ExpirationTime;
public bool HasEffectiveTime;
public DateTime EffectiveTime;
public ushort BlockSize;
public uint Blocks;
}
2019-07-29 02:45:46 +01:00
#endregion
#region Nested type: Iso9660DirNode
sealed class Iso9660DirNode : IDirNode
{
2023-10-05 01:52:48 +01:00
internal DecodedDirectoryEntry[] Entries;
internal int Position;
2024-05-01 04:05:22 +01:00
#region IDirNode Members
/// <inheritdoc />
public string Path { get; init; }
2024-05-01 04:05:22 +01:00
#endregion
}
#endregion
#region Nested type: Iso9660FileNode
sealed class Iso9660FileNode : IFileNode
{
2023-10-05 01:52:48 +01:00
internal DecodedDirectoryEntry Dentry;
2024-05-01 04:05:22 +01:00
#region IFileNode Members
/// <inheritdoc />
public string Path { get; init; }
/// <inheritdoc />
public long Length { get; init; }
/// <inheritdoc />
public long Offset { get; set; }
2024-05-01 04:05:22 +01:00
#endregion
}
#endregion
#region Nested type: PathTableEntryInternal
sealed class PathTableEntryInternal
{
public uint Extent;
public string Name;
public ushort Parent;
public byte XattrLength;
public override string ToString() => Name;
}
#endregion
2017-12-19 20:33:03 +00:00
}