2017-10-08 20:41:54 +01:00
|
|
|
|
// /***************************************************************************
|
|
|
|
|
|
// The Disc Image Chef
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
//
|
|
|
|
|
|
// Filename : ISO9660.cs
|
|
|
|
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
|
|
|
|
//
|
2017-12-19 03:50:57 +00:00
|
|
|
|
// Component : ISO9660 filesystem plugin.
|
2017-10-08 20:41:54 +01:00
|
|
|
|
//
|
|
|
|
|
|
// --[ Description ] ----------------------------------------------------------
|
|
|
|
|
|
//
|
2017-12-19 03:50:57 +00:00
|
|
|
|
// 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
|
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;
|
2019-07-19 12:14:30 +01:00
|
|
|
|
using System.Collections.Generic;
|
2017-10-08 20:41:54 +01:00
|
|
|
|
using System.Text;
|
2018-06-25 19:08:16 +01:00
|
|
|
|
using DiscImageChef.CommonTypes.Interfaces;
|
2019-07-19 12:14:30 +01:00
|
|
|
|
using DiscImageChef.CommonTypes.Structs;
|
2017-12-26 06:05:12 +00:00
|
|
|
|
using Schemas;
|
2017-10-08 20:41:54 +01:00
|
|
|
|
|
|
|
|
|
|
namespace DiscImageChef.Filesystems.ISO9660
|
|
|
|
|
|
{
|
|
|
|
|
|
// This is coded following ECMA-119.
|
2019-07-19 12:14:30 +01:00
|
|
|
|
public partial class ISO9660 : IReadOnlyFilesystem
|
2017-10-08 20:41:54 +01:00
|
|
|
|
{
|
2019-07-19 16:20:58 +01:00
|
|
|
|
bool cdi;
|
|
|
|
|
|
bool debug;
|
|
|
|
|
|
bool highSierra;
|
|
|
|
|
|
IMediaImage image;
|
2019-07-22 02:42:17 +01:00
|
|
|
|
Dictionary<string, DecodedDirectoryEntry> jolietRootDirectoryCache;
|
2019-07-19 16:20:58 +01:00
|
|
|
|
bool mounted;
|
|
|
|
|
|
Namespace @namespace;
|
|
|
|
|
|
Dictionary<string, DecodedDirectoryEntry> rootDirectoryCache;
|
|
|
|
|
|
FileSystemInfo statfs;
|
2019-07-19 14:26:02 +01:00
|
|
|
|
|
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";
|
2019-07-19 12:14:30 +01:00
|
|
|
|
|
|
|
|
|
|
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
|
|
|
|
|
|
new (string name, Type type, string description)[] { };
|
|
|
|
|
|
|
|
|
|
|
|
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"},
|
2019-07-19 14:26:02 +01:00
|
|
|
|
{"joliet+normal", "Joliet with fallback to normal"},
|
|
|
|
|
|
{"rrip", "Rock Ridge"},
|
|
|
|
|
|
{"rrip+normal", "Rock Ridge with fallback to normal"},
|
|
|
|
|
|
{"rrip+joliet", "Rock Ridge with fallback to Joliet"},
|
|
|
|
|
|
{"rrip+joliet+normal", "Rock Ridge with fallback to Joliet and then to normal (default)"}
|
2019-07-19 12:14:30 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
public Errno ReadLink(string path, out string dest)
|
|
|
|
|
|
{
|
|
|
|
|
|
dest = null;
|
|
|
|
|
|
|
|
|
|
|
|
return Errno.NotSupported;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|