Move common data structures for MFS, HFS and ISO9660 (Apple Extensions) to common class.

This commit is contained in:
2020-02-19 03:37:51 +00:00
parent 177031d7ac
commit 999657502b
14 changed files with 459 additions and 351 deletions

View File

@@ -52,12 +52,12 @@ namespace DiscImageChef.Filesystems.ISO9660
[StructLayout(LayoutKind.Sequential, Pack = 1)]
struct AppleHFSSystemUse
{
public readonly ushort signature;
public readonly byte length;
public readonly AppleId id;
public readonly uint type;
public readonly uint creator;
public readonly FinderFlags finder_flags;
public readonly ushort signature;
public readonly byte length;
public readonly AppleId id;
public readonly uint type;
public readonly uint creator;
public readonly AppleCommon.FinderFlags finder_flags;
}
// Little-endian

View File

@@ -69,7 +69,7 @@ namespace DiscImageChef.Filesystems.ISO9660
public List<(uint extent, uint size)> Extents;
public string Filename;
public byte FileUnitSize;
public FinderInfo FinderInfo;
public AppleCommon.FInfo? FinderInfo;
public FileFlags Flags;
public byte Interleave;
public PosixAttributes? PosixAttributes;
@@ -95,40 +95,6 @@ namespace DiscImageChef.Filesystems.ISO9660
public override string ToString() => Filename;
}
[Flags]
enum FinderFlags : ushort
{
kIsOnDesk = 0x0001,
kColor = 0x000E,
kRequireSwitchLaunch = 0x0020,
kIsShared = 0x0040,
kHasNoINITs = 0x0080,
kHasBeenInited = 0x0100,
kHasCustomIcon = 0x0400,
kLetter = 0x0200,
kChanged = 0x0200,
kIsStationery = 0x0800,
kNameLocked = 0x1000,
kHasBundle = 0x2000,
kIsInvisible = 0x4000,
kIsAlias = 0x8000
}
struct Point
{
public short x;
public short y;
}
class FinderInfo
{
public uint fdCreator;
public FinderFlags fdFlags;
public short fdFldr;
public Point fdLocation;
public uint fdType;
}
class PathTableEntryInternal
{
public uint Extent;