diff --git a/Aaru.Filesystems/ODS/Consts.cs b/Aaru.Filesystems/ODS/Consts.cs index 4138a390c..56acc693f 100644 --- a/Aaru.Filesystems/ODS/Consts.cs +++ b/Aaru.Filesystems/ODS/Consts.cs @@ -32,16 +32,6 @@ namespace Aaru.Filesystems; -// Information from VMS File System Internals by Kirby McCoy -// ISBN: 1-55558-056-4 -// With some hints from http://www.decuslib.com/DECUS/vmslt97b/gnusoftware/gccaxp/7_1/vms/hm2def.h -// Expects the home block to be always in sector #1 (does not check deltas) -// Assumes a sector size of 512 bytes (VMS does on HDDs and optical drives, dunno about M.O.) -// Book only describes ODS-2. Need to test ODS-1 and ODS-5 -// There is an ODS with signature "DECFILES11A", yet to be seen -// Time is a 64 bit unsigned integer, tenths of microseconds since 1858/11/17 00:00:00. -/// -/// Implements detection of DEC's On-Disk Structure, aka the ODS filesystem public sealed partial class ODS { const string FS_TYPE = "files11"; diff --git a/Aaru.Filesystems/ODS/Info.cs b/Aaru.Filesystems/ODS/Info.cs index 4d8fc9471..7656ea82d 100644 --- a/Aaru.Filesystems/ODS/Info.cs +++ b/Aaru.Filesystems/ODS/Info.cs @@ -41,16 +41,6 @@ using Partition = Aaru.CommonTypes.Partition; namespace Aaru.Filesystems; -// Information from VMS File System Internals by Kirby McCoy -// ISBN: 1-55558-056-4 -// With some hints from http://www.decuslib.com/DECUS/vmslt97b/gnusoftware/gccaxp/7_1/vms/hm2def.h -// Expects the home block to be always in sector #1 (does not check deltas) -// Assumes a sector size of 512 bytes (VMS does on HDDs and optical drives, dunno about M.O.) -// Book only describes ODS-2. Need to test ODS-1 and ODS-5 -// There is an ODS with signature "DECFILES11A", yet to be seen -// Time is a 64 bit unsigned integer, tenths of microseconds since 1858/11/17 00:00:00. -/// -/// Implements detection of DEC's On-Disk Structure, aka the ODS filesystem public sealed partial class ODS { #region IFilesystem Members diff --git a/Aaru.Filesystems/ODS/ODS.cs b/Aaru.Filesystems/ODS/ODS.cs index b49e522a2..b989b6564 100644 --- a/Aaru.Filesystems/ODS/ODS.cs +++ b/Aaru.Filesystems/ODS/ODS.cs @@ -31,6 +31,8 @@ // ****************************************************************************/ using System; +using System.Collections.Generic; +using Aaru.CommonTypes.AaruMetadata; using Aaru.CommonTypes.Interfaces; namespace Aaru.Filesystems; @@ -38,17 +40,25 @@ namespace Aaru.Filesystems; // Information from VMS File System Internals by Kirby McCoy // ISBN: 1-55558-056-4 // With some hints from http://www.decuslib.com/DECUS/vmslt97b/gnusoftware/gccaxp/7_1/vms/hm2def.h +// And the Linux ODS5 implementation by Hartmut Becker // Expects the home block to be always in sector #1 (does not check deltas) // Assumes a sector size of 512 bytes (VMS does on HDDs and optical drives, dunno about M.O.) // Book only describes ODS-2. Need to test ODS-1 and ODS-5 // There is an ODS with signature "DECFILES11A", yet to be seen // Time is a 64 bit unsigned integer, tenths of microseconds since 1858/11/17 00:00:00. /// -/// Implements detection of DEC's On-Disk Structure, aka the ODS filesystem -public sealed partial class ODS : IFilesystem +/// Implements DEC's On-Disk Structure, aka the ODS filesystem +public sealed partial class ODS : IReadOnlyFilesystem { const string MODULE_NAME = "Files-11 plugin"; + /// + public FileSystem Metadata { get; private set; } + /// + public IEnumerable<(string name, Type type, string description)> SupportedOptions { get; } = []; + /// + public Dictionary Namespaces { get; } = []; + #region IFilesystem Members /// diff --git a/Aaru.Filesystems/ODS/Structs.cs b/Aaru.Filesystems/ODS/Structs.cs index 14b19b26f..038a9569c 100644 --- a/Aaru.Filesystems/ODS/Structs.cs +++ b/Aaru.Filesystems/ODS/Structs.cs @@ -34,17 +34,6 @@ using System.Runtime.InteropServices; namespace Aaru.Filesystems; -// Information from VMS File System Internals by Kirby McCoy -// ISBN: 1-55558-056-4 -// With some hints from http://www.decuslib.com/DECUS/vmslt97b/gnusoftware/gccaxp/7_1/vms/hm2def.h -// And the Linux ODS5 implementation by Hartmut Becker -// Expects the home block to be always in sector #1 (does not check deltas) -// Assumes a sector size of 512 bytes (VMS does on HDDs and optical drives, dunno about M.O.) -// Book only describes ODS-2. Need to test ODS-1 and ODS-5 -// There is an ODS with signature "DECFILES11A", yet to be seen -// Time is a 64 bit unsigned integer, tenths of microseconds since 1858/11/17 00:00:00. -/// -/// Implements detection of DEC's On-Disk Structure, aka the ODS filesystem public sealed partial class ODS { #region Nested type: HomeBlock diff --git a/Aaru.Filesystems/ODS/Unimplemented.cs b/Aaru.Filesystems/ODS/Unimplemented.cs new file mode 100644 index 000000000..4d275c1ea --- /dev/null +++ b/Aaru.Filesystems/ODS/Unimplemented.cs @@ -0,0 +1,82 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : Unimplemented.cs +// Author(s) : Natalia Portillo +// +// Component : Files-11 On-Disk Structure 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 . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2026 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Collections.Generic; +using System.Text; +using Aaru.CommonTypes; +using Aaru.CommonTypes.Enums; +using Aaru.CommonTypes.Interfaces; +using Aaru.CommonTypes.Structs; + +namespace Aaru.Filesystems; + +public sealed partial class ODS +{ + /// + public ErrorNumber Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, + Dictionary options, string @namespace) => + throw new NotImplementedException(); + + /// + public ErrorNumber Unmount() => throw new NotImplementedException(); + + /// + public ErrorNumber ListXAttr(string path, out List xattrs) => throw new NotImplementedException(); + + /// + public ErrorNumber GetXattr(string path, string xattr, ref byte[] buf) => throw new NotImplementedException(); + + /// + public ErrorNumber StatFs(out FileSystemInfo stat) => throw new NotImplementedException(); + + /// + public ErrorNumber Stat(string path, out FileEntryInfo stat) => throw new NotImplementedException(); + + /// + public ErrorNumber ReadLink(string path, out string dest) => throw new NotImplementedException(); + + /// + public ErrorNumber OpenFile(string path, out IFileNode node) => throw new NotImplementedException(); + + /// + public ErrorNumber CloseFile(IFileNode node) => throw new NotImplementedException(); + + /// + public ErrorNumber ReadFile(IFileNode node, long length, byte[] buffer, out long read) => + throw new NotImplementedException(); + + /// + public ErrorNumber OpenDir(string path, out IDirNode node) => throw new NotImplementedException(); + + /// + public ErrorNumber CloseDir(IDirNode node) => throw new NotImplementedException(); + + /// + public ErrorNumber ReadDir(IDirNode node, out string filename) => throw new NotImplementedException(); +} \ No newline at end of file