2020-03-11 21:56:55 +00:00
|
|
|
// /***************************************************************************
|
|
|
|
|
// Aaru Data Preservation Suite
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
//
|
|
|
|
|
// Filename : Consts.cs
|
|
|
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
|
|
|
//
|
|
|
|
|
// Component : Opera filesystem plugin.
|
|
|
|
|
//
|
|
|
|
|
// --[ Description ] ----------------------------------------------------------
|
|
|
|
|
//
|
|
|
|
|
// Opera filesystem constants.
|
|
|
|
|
//
|
|
|
|
|
// --[ 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/>.
|
|
|
|
|
//
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2022-02-18 10:02:53 +00:00
|
|
|
// Copyright © 2011-2022 Natalia Portillo
|
2020-03-11 21:56:55 +00:00
|
|
|
// ****************************************************************************/
|
|
|
|
|
|
2020-07-20 07:47:12 +01:00
|
|
|
using System.Diagnostics.CodeAnalysis;
|
2020-02-27 00:33:26 +00:00
|
|
|
using Aaru.Helpers;
|
2019-08-01 23:37:21 +01:00
|
|
|
|
2022-11-15 15:58:43 +00:00
|
|
|
namespace Aaru.Filesystems;
|
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
[SuppressMessage("ReSharper", "UnusedMember.Local")]
|
|
|
|
|
public sealed partial class OperaFS
|
2019-08-01 16:21:10 +01:00
|
|
|
{
|
2022-03-06 13:29:38 +00:00
|
|
|
const string SYNC = "ZZZZZ";
|
|
|
|
|
const uint FLAGS_MASK = 0xFF;
|
|
|
|
|
const int MAX_NAME = 32;
|
2019-08-01 17:00:30 +01:00
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
/// <summary>Directory</summary>
|
|
|
|
|
const uint TYPE_DIR = 0x2A646972;
|
|
|
|
|
/// <summary>Disc label</summary>
|
|
|
|
|
const uint TYPE_LBL = 0x2A6C626C;
|
|
|
|
|
/// <summary>Catapult</summary>
|
|
|
|
|
const uint TYPE_ZAP = 0x2A7A6170;
|
|
|
|
|
static readonly int _directoryEntrySize = Marshal.SizeOf<DirectoryEntry>();
|
2019-08-01 17:00:30 +01:00
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
enum FileFlags : uint
|
|
|
|
|
{
|
2022-11-15 15:58:43 +00:00
|
|
|
File = 2, Special = 6, Directory = 7,
|
|
|
|
|
LastEntryInBlock = 0x40000000, LastEntry = 0x80000000
|
2019-08-01 17:00:30 +01:00
|
|
|
}
|
2019-08-01 16:21:10 +01:00
|
|
|
}
|