Files
Aaru/DiscImageChef.Filesystems/ISO9660/ISO9660.cs

88 lines
4.1 KiB
C#
Raw Normal View History

2017-10-08 20:41:54 +01:00
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : ISO9660.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : ISO9660 filesystem plugin.
2017-10-08 20:41:54 +01:00
//
// --[ Description ] ----------------------------------------------------------
//
// Constructors and common variables for the ISO9660 filesystem plugin.
2017-10-08 20:41:54 +01:00
//
// --[ 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/>.
//
// ----------------------------------------------------------------------------
2018-12-29 17:34:38 +00:00
// Copyright © 2011-2019 Natalia Portillo
// In the loving memory of Facunda "Tata" Suárez Domínguez, R.I.P. 2019/07/24
2017-10-08 20:41:54 +01:00
// ****************************************************************************/
2017-12-19 19:33:46 +00:00
2017-10-08 20:41:54 +01:00
using System;
using System.Collections.Generic;
2017-10-08 20:41:54 +01:00
using System.Text;
using DiscImageChef.CommonTypes.Interfaces;
using DiscImageChef.CommonTypes.Structs;
using Schemas;
2017-10-08 20:41:54 +01:00
namespace DiscImageChef.Filesystems.ISO9660
{
// This is coded following ECMA-119.
public partial class ISO9660 : IReadOnlyFilesystem
2017-10-08 20:41:54 +01:00
{
bool cdi;
bool debug;
bool highSierra;
IMediaImage image;
2019-07-22 02:58:56 +01:00
bool joliet;
bool mounted;
Namespace @namespace;
2019-07-29 02:45:46 +01:00
PathTableEntryInternal[] pathTable;
Dictionary<string, DecodedDirectoryEntry> rootDirectoryCache;
FileSystemInfo statfs;
bool useEvd;
bool usePathTable;
2019-07-31 01:02:56 +01:00
bool useTransTbl;
2017-12-26 08:01:40 +00:00
public FileSystemType XmlFsType { get; private set; }
2018-06-22 08:08:38 +01:00
public Encoding Encoding { get; private set; }
public string Name => "ISO9660 Filesystem";
public Guid Id => new Guid("d812f4d3-c357-400d-90fd-3b22ef786aa8");
2018-08-29 22:15:43 +01:00
public string Author => "Natalia Portillo";
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
new (string name, Type type, string description)[]
{
2019-07-31 01:02:56 +01:00
("use_path_table", typeof(bool), "Use path table for directory traversal"),
("use_trans_tbl", typeof(bool), "Use TRANS.TBL for filenames"),
("use_evd", typeof(bool),
"If present, use Enhanced Volume Descriptor with specified encoding (overrides namespace)")
};
public Dictionary<string, string> Namespaces =>
new Dictionary<string, string>
{
{"normal", "Primary Volume Descriptor, ignoring ;1 suffixes"},
{"vms", "Primary Volume Descriptor, showing version suffixes"},
{"joliet", "Joliet Volume Descriptor (default)"},
2019-07-24 00:26:07 +01:00
{"rrip", "Rock Ridge"},
{"romeo", "Primary Volume Descriptor using the specified encoding codepage"}
};
static Dictionary<string, string> GetDefaultOptions() =>
new Dictionary<string, string> {{"debug", false.ToString()}};
2017-10-08 20:41:54 +01:00
}
2017-12-19 20:33:03 +00:00
}