From 6aee3c9cb11d0e9609f988c392fbbd917a59af71 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Tue, 26 Dec 2017 07:23:09 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8Separate=20read-only=20filesystems?= =?UTF-8?q?=20from=20identify-only=20filesystem=20interfaces.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../.idea/contentModel.xml | 6 +- DiscImageChef.Core/PluginBase.cs | 27 +++- DiscImageChef.Filesystems/AODOS.cs | 55 ------- DiscImageChef.Filesystems/APFS.cs | 55 ------- DiscImageChef.Filesystems/Acorn.cs | 55 ------- DiscImageChef.Filesystems/AmigaDOS.cs | 55 ------- .../AppleDOS/AppleDOS.cs | 2 +- DiscImageChef.Filesystems/AppleHFS.cs | 55 ------- DiscImageChef.Filesystems/AppleHFSPlus.cs | 55 ------- .../AppleMFS/AppleMFS.cs | 2 +- DiscImageChef.Filesystems/AtheOS.cs | 55 ------- DiscImageChef.Filesystems/BFS.cs | 55 ------- DiscImageChef.Filesystems/BTRFS.cs | 55 ------- DiscImageChef.Filesystems/CBM.cs | 55 ------- DiscImageChef.Filesystems/CPM/CPM.cs | 2 +- DiscImageChef.Filesystems/Cram.cs | 55 ------- .../DiscImageChef.Filesystems.csproj | 6 +- DiscImageChef.Filesystems/ECMA67.cs | 55 ------- DiscImageChef.Filesystems/EFS.cs | 55 ------- DiscImageChef.Filesystems/F2FS.cs | 55 ------- DiscImageChef.Filesystems/FAT.cs | 55 ------- DiscImageChef.Filesystems/FATX.cs | 55 ------- DiscImageChef.Filesystems/FFS.cs | 55 ------- DiscImageChef.Filesystems/Fossil.cs | 55 ------- DiscImageChef.Filesystems/HAMMER.cs | 55 ------- DiscImageChef.Filesystems/HPFS.cs | 55 ------- DiscImageChef.Filesystems/IFilesystem.cs | 87 ----------- .../IReadOnlyFilesystem.cs | 135 ++++++++++++++++++ DiscImageChef.Filesystems/ISO9660/Dir.cs | 49 ------- DiscImageChef.Filesystems/ISO9660/Extent.cs | 42 ------ DiscImageChef.Filesystems/ISO9660/File.cs | 52 ------- DiscImageChef.Filesystems/ISO9660/Super.cs | 56 -------- DiscImageChef.Filesystems/ISO9660/Xattr.cs | 49 ------- DiscImageChef.Filesystems/JFS.cs | 55 ------- DiscImageChef.Filesystems/LIF.cs | 55 ------- DiscImageChef.Filesystems/LisaFS/LisaFS.cs | 2 +- DiscImageChef.Filesystems/LisaFS/Xattr.cs | 2 +- DiscImageChef.Filesystems/Locus.cs | 55 ------- DiscImageChef.Filesystems/MicroDOS.cs | 55 ------- DiscImageChef.Filesystems/MinixFS.cs | 55 ------- DiscImageChef.Filesystems/NILFS2.cs | 55 ------- DiscImageChef.Filesystems/NTFS.cs | 55 ------- DiscImageChef.Filesystems/Nintendo.cs | 55 ------- DiscImageChef.Filesystems/ODS.cs | 55 ------- DiscImageChef.Filesystems/Opera.cs | 55 ------- DiscImageChef.Filesystems/PCEngine.cs | 55 ------- DiscImageChef.Filesystems/PFS.cs | 55 ------- DiscImageChef.Filesystems/ProDOS.cs | 55 ------- DiscImageChef.Filesystems/QNX4.cs | 55 ------- DiscImageChef.Filesystems/QNX6.cs | 55 ------- DiscImageChef.Filesystems/RBF.cs | 55 ------- DiscImageChef.Filesystems/RT11.cs | 55 ------- DiscImageChef.Filesystems/Reiser.cs | 55 ------- DiscImageChef.Filesystems/Reiser4.cs | 55 ------- DiscImageChef.Filesystems/SFS.cs | 55 ------- DiscImageChef.Filesystems/SolarFS.cs | 55 ------- DiscImageChef.Filesystems/Squash.cs | 55 ------- DiscImageChef.Filesystems/SysV.cs | 55 ------- .../UCSDPascal/UCSDPascal.cs | 2 +- DiscImageChef.Filesystems/UDF.cs | 55 ------- DiscImageChef.Filesystems/UNICOS.cs | 55 ------- DiscImageChef.Filesystems/UNIXBFS.cs | 67 +-------- DiscImageChef.Filesystems/VMfs.cs | 55 ------- DiscImageChef.Filesystems/VxFS.cs | 55 ------- DiscImageChef.Filesystems/XFS.cs | 55 ------- DiscImageChef.Filesystems/Xia.cs | 55 ------- DiscImageChef.Filesystems/ZFS.cs | 55 ------- DiscImageChef.Filesystems/dump.cs | 55 ------- DiscImageChef.Filesystems/exFAT.cs | 55 ------- DiscImageChef.Filesystems/ext2FS.cs | 55 ------- DiscImageChef.Filesystems/extFS.cs | 55 ------- DiscImageChef/Commands/ExtractFiles.cs | 18 +-- DiscImageChef/Commands/Formats.cs | 19 ++- DiscImageChef/Commands/Ls.cs | 18 +-- 74 files changed, 206 insertions(+), 3407 deletions(-) create mode 100644 DiscImageChef.Filesystems/IReadOnlyFilesystem.cs delete mode 100644 DiscImageChef.Filesystems/ISO9660/Dir.cs delete mode 100644 DiscImageChef.Filesystems/ISO9660/Extent.cs delete mode 100644 DiscImageChef.Filesystems/ISO9660/File.cs delete mode 100644 DiscImageChef.Filesystems/ISO9660/Super.cs delete mode 100644 DiscImageChef.Filesystems/ISO9660/Xattr.cs diff --git a/.idea/.idea.DiscImageChef/.idea/contentModel.xml b/.idea/.idea.DiscImageChef/.idea/contentModel.xml index bb726e684..7b3d6999a 100644 --- a/.idea/.idea.DiscImageChef/.idea/contentModel.xml +++ b/.idea/.idea.DiscImageChef/.idea/contentModel.xml @@ -506,6 +506,7 @@ + @@ -520,9 +521,6 @@ - - - @@ -539,8 +537,6 @@ - - diff --git a/DiscImageChef.Core/PluginBase.cs b/DiscImageChef.Core/PluginBase.cs index 1e0cd7179..65bed8741 100644 --- a/DiscImageChef.Core/PluginBase.cs +++ b/DiscImageChef.Core/PluginBase.cs @@ -59,6 +59,10 @@ namespace DiscImageChef.Core /// List of all filesystem plugins /// public readonly SortedDictionary PluginsList; + /// + /// List of all filesystem plugins + /// + public readonly SortedDictionary ReadOnlyFilesystems; /// /// Initializes the plugins lists @@ -66,12 +70,13 @@ namespace DiscImageChef.Core public PluginBase() { PluginsList = new SortedDictionary(); + ReadOnlyFilesystems = new SortedDictionary(); PartPluginsList = new SortedDictionary(); ImagePluginsList = new SortedDictionary(); Assembly assembly = Assembly.GetAssembly(typeof(IMediaImage)); - foreach(Type type in assembly.GetTypes().Where(t => t.GetInterfaces().Contains(typeof(IMediaImage)))) + foreach(Type type in assembly.GetTypes().Where(t => t.GetInterfaces().Contains(typeof(IMediaImage))).Where(t=>t.IsClass)) try { IMediaImage plugin = (IMediaImage)type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { }); @@ -81,7 +86,7 @@ namespace DiscImageChef.Core assembly = Assembly.GetAssembly(typeof(IPartition)); - foreach(Type type in assembly.GetTypes().Where(t => t.GetInterfaces().Contains(typeof(IPartition)))) + foreach(Type type in assembly.GetTypes().Where(t => t.GetInterfaces().Contains(typeof(IPartition))).Where(t=>t.IsClass)) try { IPartition plugin = @@ -92,13 +97,24 @@ namespace DiscImageChef.Core assembly = Assembly.GetAssembly(typeof(IFilesystem)); - foreach(Type type in assembly.GetTypes().Where(t => t.GetInterfaces().Contains(typeof(IFilesystem)))) + foreach(Type type in assembly.GetTypes().Where(t => t.GetInterfaces().Contains(typeof(IFilesystem))).Where(t=>t.IsClass)) try { IFilesystem plugin = (IFilesystem)type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { }); RegisterPlugin(plugin); } catch(Exception exception) { DicConsole.ErrorWriteLine("Exception {0}", exception); } + + + assembly = Assembly.GetAssembly(typeof(IReadOnlyFilesystem)); + + foreach(Type type in assembly.GetTypes().Where(t => t.GetInterfaces().Contains(typeof(IReadOnlyFilesystem))).Where(t=>t.IsClass)) + try + { + IReadOnlyFilesystem plugin = (IReadOnlyFilesystem)type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { }); + RegisterReadOnlyFilesystem(plugin); + } + catch(Exception exception) { DicConsole.ErrorWriteLine("Exception {0}", exception); } } void RegisterImagePlugin(IMediaImage plugin) @@ -112,6 +128,11 @@ namespace DiscImageChef.Core if(!PluginsList.ContainsKey(plugin.Name.ToLower())) PluginsList.Add(plugin.Name.ToLower(), plugin); } + void RegisterReadOnlyFilesystem(IReadOnlyFilesystem plugin) + { + if(!ReadOnlyFilesystems.ContainsKey(plugin.Name.ToLower())) ReadOnlyFilesystems.Add(plugin.Name.ToLower(), plugin); + } + void RegisterPartPlugin(IPartition partplugin) { if(!PartPluginsList.ContainsKey(partplugin.Name.ToLower())) diff --git a/DiscImageChef.Filesystems/AODOS.cs b/DiscImageChef.Filesystems/AODOS.cs index a30dc1a4c..601d9fcef 100644 --- a/DiscImageChef.Filesystems/AODOS.cs +++ b/DiscImageChef.Filesystems/AODOS.cs @@ -109,61 +109,6 @@ namespace DiscImageChef.Filesystems information = sbInformation.ToString(); } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - [StructLayout(LayoutKind.Sequential, Pack = 1)] struct AODOS_BootBlock { diff --git a/DiscImageChef.Filesystems/APFS.cs b/DiscImageChef.Filesystems/APFS.cs index efd9e5267..c6e9fe989 100644 --- a/DiscImageChef.Filesystems/APFS.cs +++ b/DiscImageChef.Filesystems/APFS.cs @@ -112,61 +112,6 @@ namespace DiscImageChef.Filesystems }; } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - [StructLayout(LayoutKind.Sequential, Pack = 1)] struct ApfsContainerSuperBlock { diff --git a/DiscImageChef.Filesystems/Acorn.cs b/DiscImageChef.Filesystems/Acorn.cs index c6030c672..463d764b0 100644 --- a/DiscImageChef.Filesystems/Acorn.cs +++ b/DiscImageChef.Filesystems/Acorn.cs @@ -501,61 +501,6 @@ namespace DiscImageChef.Filesystems xmlFsType.Type = "Acorn Advanced Disc Filing System"; } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - byte AcornMapChecksum(byte[] data, int length) { int sum = 0; diff --git a/DiscImageChef.Filesystems/AmigaDOS.cs b/DiscImageChef.Filesystems/AmigaDOS.cs index 1738ffe39..ec25b675b 100644 --- a/DiscImageChef.Filesystems/AmigaDOS.cs +++ b/DiscImageChef.Filesystems/AmigaDOS.cs @@ -371,61 +371,6 @@ namespace DiscImageChef.Filesystems return ~sum; } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - /// /// Boot block, first 2 sectors /// diff --git a/DiscImageChef.Filesystems/AppleDOS/AppleDOS.cs b/DiscImageChef.Filesystems/AppleDOS/AppleDOS.cs index ab52fc49c..f553ea1b0 100644 --- a/DiscImageChef.Filesystems/AppleDOS/AppleDOS.cs +++ b/DiscImageChef.Filesystems/AppleDOS/AppleDOS.cs @@ -40,7 +40,7 @@ using Encoding = System.Text.Encoding; namespace DiscImageChef.Filesystems.AppleDOS { - public partial class AppleDOS : IFilesystem + public partial class AppleDOS : IReadOnlyFilesystem { IMediaImage device; Encoding currentEncoding; diff --git a/DiscImageChef.Filesystems/AppleHFS.cs b/DiscImageChef.Filesystems/AppleHFS.cs index 520d6bf1f..28b319289 100644 --- a/DiscImageChef.Filesystems/AppleHFS.cs +++ b/DiscImageChef.Filesystems/AppleHFS.cs @@ -300,61 +300,6 @@ namespace DiscImageChef.Filesystems return sector; } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - /// /// Master Directory Block, should be sector 2 in volume /// diff --git a/DiscImageChef.Filesystems/AppleHFSPlus.cs b/DiscImageChef.Filesystems/AppleHFSPlus.cs index 672fd81f8..ef3389636 100644 --- a/DiscImageChef.Filesystems/AppleHFSPlus.cs +++ b/DiscImageChef.Filesystems/AppleHFSPlus.cs @@ -260,61 +260,6 @@ namespace DiscImageChef.Filesystems else return; } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - /// /// HFS+ Volume Header, should be at offset 0x0400 bytes in volume with a size of 532 bytes /// diff --git a/DiscImageChef.Filesystems/AppleMFS/AppleMFS.cs b/DiscImageChef.Filesystems/AppleMFS/AppleMFS.cs index c06081501..b9a6d22f9 100644 --- a/DiscImageChef.Filesystems/AppleMFS/AppleMFS.cs +++ b/DiscImageChef.Filesystems/AppleMFS/AppleMFS.cs @@ -40,7 +40,7 @@ using Schemas; namespace DiscImageChef.Filesystems.AppleMFS { // Information from Inside Macintosh Volume II - public partial class AppleMFS : IFilesystem + public partial class AppleMFS : IReadOnlyFilesystem { bool mounted; bool debug; diff --git a/DiscImageChef.Filesystems/AtheOS.cs b/DiscImageChef.Filesystems/AtheOS.cs index 498d77ed6..25a52e712 100644 --- a/DiscImageChef.Filesystems/AtheOS.cs +++ b/DiscImageChef.Filesystems/AtheOS.cs @@ -151,61 +151,6 @@ namespace DiscImageChef.Filesystems }; } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - /// /// Be superblock /// diff --git a/DiscImageChef.Filesystems/BFS.cs b/DiscImageChef.Filesystems/BFS.cs index 7a7f781ca..bdac0f7db 100644 --- a/DiscImageChef.Filesystems/BFS.cs +++ b/DiscImageChef.Filesystems/BFS.cs @@ -208,61 +208,6 @@ namespace DiscImageChef.Filesystems }; } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - /// /// Be superblock /// diff --git a/DiscImageChef.Filesystems/BTRFS.cs b/DiscImageChef.Filesystems/BTRFS.cs index 99ddb188f..f04f78361 100644 --- a/DiscImageChef.Filesystems/BTRFS.cs +++ b/DiscImageChef.Filesystems/BTRFS.cs @@ -184,61 +184,6 @@ namespace DiscImageChef.Filesystems xmlFsType.FreeClusters = xmlFsType.Clusters - (long)(btrfsSb.bytes_used / btrfsSb.sectorsize); } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - [StructLayout(LayoutKind.Sequential, Pack = 1)] struct SuperBlock { diff --git a/DiscImageChef.Filesystems/CBM.cs b/DiscImageChef.Filesystems/CBM.cs index 3a2007d99..eb3eaaf71 100644 --- a/DiscImageChef.Filesystems/CBM.cs +++ b/DiscImageChef.Filesystems/CBM.cs @@ -159,61 +159,6 @@ namespace DiscImageChef.Filesystems information = sbInformation.ToString(); } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - [StructLayout(LayoutKind.Sequential, Pack = 1)] struct CommodoreBAM { diff --git a/DiscImageChef.Filesystems/CPM/CPM.cs b/DiscImageChef.Filesystems/CPM/CPM.cs index b69668c72..cfc3b49e1 100644 --- a/DiscImageChef.Filesystems/CPM/CPM.cs +++ b/DiscImageChef.Filesystems/CPM/CPM.cs @@ -39,7 +39,7 @@ using Schemas; namespace DiscImageChef.Filesystems.CPM { - partial class CPM : IFilesystem + partial class CPM : IReadOnlyFilesystem { /// /// True if thinks this is a CP/M filesystem diff --git a/DiscImageChef.Filesystems/Cram.cs b/DiscImageChef.Filesystems/Cram.cs index c220478e6..b2d988b77 100644 --- a/DiscImageChef.Filesystems/Cram.cs +++ b/DiscImageChef.Filesystems/Cram.cs @@ -114,61 +114,6 @@ namespace DiscImageChef.Filesystems }; } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - enum CramCompression : ushort { Zlib = 1, diff --git a/DiscImageChef.Filesystems/DiscImageChef.Filesystems.csproj b/DiscImageChef.Filesystems/DiscImageChef.Filesystems.csproj index 37d8112c7..9d118f84b 100644 --- a/DiscImageChef.Filesystems/DiscImageChef.Filesystems.csproj +++ b/DiscImageChef.Filesystems/DiscImageChef.Filesystems.csproj @@ -38,6 +38,7 @@ + @@ -137,13 +138,8 @@ - - - - - diff --git a/DiscImageChef.Filesystems/ECMA67.cs b/DiscImageChef.Filesystems/ECMA67.cs index 2a3703be8..ab88dea53 100644 --- a/DiscImageChef.Filesystems/ECMA67.cs +++ b/DiscImageChef.Filesystems/ECMA67.cs @@ -101,61 +101,6 @@ namespace DiscImageChef.Filesystems information = sbInformation.ToString(); } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - [StructLayout(LayoutKind.Sequential, Pack = 1)] struct VolumeLabel { diff --git a/DiscImageChef.Filesystems/EFS.cs b/DiscImageChef.Filesystems/EFS.cs index 6a0b81e61..9c52e319c 100644 --- a/DiscImageChef.Filesystems/EFS.cs +++ b/DiscImageChef.Filesystems/EFS.cs @@ -184,61 +184,6 @@ namespace DiscImageChef.Filesystems }; } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - [StructLayout(LayoutKind.Sequential, Pack = 1)] [SuppressMessage("ReSharper", "InconsistentNaming")] struct EFS_Superblock diff --git a/DiscImageChef.Filesystems/F2FS.cs b/DiscImageChef.Filesystems/F2FS.cs index 806448778..45ff4e96e 100644 --- a/DiscImageChef.Filesystems/F2FS.cs +++ b/DiscImageChef.Filesystems/F2FS.cs @@ -144,61 +144,6 @@ namespace DiscImageChef.Filesystems }; } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - [StructLayout(LayoutKind.Sequential, Pack = 1)] [SuppressMessage("ReSharper", "InconsistentNaming")] struct F2FS_Superblock diff --git a/DiscImageChef.Filesystems/FAT.cs b/DiscImageChef.Filesystems/FAT.cs index c4212c4a7..e2d3578ea 100644 --- a/DiscImageChef.Filesystems/FAT.cs +++ b/DiscImageChef.Filesystems/FAT.cs @@ -1353,61 +1353,6 @@ namespace DiscImageChef.Filesystems information = sb.ToString(); } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - /// /// BIOS Parameter Block as used by Atari ST GEMDOS on FAT12 volumes. /// diff --git a/DiscImageChef.Filesystems/FATX.cs b/DiscImageChef.Filesystems/FATX.cs index 9bbd2795d..47273f601 100644 --- a/DiscImageChef.Filesystems/FATX.cs +++ b/DiscImageChef.Filesystems/FATX.cs @@ -98,61 +98,6 @@ namespace DiscImageChef.Filesystems (ulong)xmlFsType.ClusterSize); } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - [StructLayout(LayoutKind.Sequential, Pack = 1)] struct FATX_Superblock { diff --git a/DiscImageChef.Filesystems/FFS.cs b/DiscImageChef.Filesystems/FFS.cs index 50d1c3a31..32eeafe48 100644 --- a/DiscImageChef.Filesystems/FFS.cs +++ b/DiscImageChef.Filesystems/FFS.cs @@ -481,61 +481,6 @@ namespace DiscImageChef.Filesystems information = sbInformation.ToString(); } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - [StructLayout(LayoutKind.Sequential, Pack = 1)] struct csum { diff --git a/DiscImageChef.Filesystems/Fossil.cs b/DiscImageChef.Filesystems/Fossil.cs index a3aa89194..63a0fa56d 100644 --- a/DiscImageChef.Filesystems/Fossil.cs +++ b/DiscImageChef.Filesystems/Fossil.cs @@ -134,61 +134,6 @@ namespace DiscImageChef.Filesystems information = sb.ToString(); } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - [StructLayout(LayoutKind.Sequential, Pack = 1)] struct FossilHeader { diff --git a/DiscImageChef.Filesystems/HAMMER.cs b/DiscImageChef.Filesystems/HAMMER.cs index 0287f3c01..1d5c3c4d4 100644 --- a/DiscImageChef.Filesystems/HAMMER.cs +++ b/DiscImageChef.Filesystems/HAMMER.cs @@ -150,61 +150,6 @@ namespace DiscImageChef.Filesystems information = sb.ToString(); } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - /// /// Hammer superblock /// diff --git a/DiscImageChef.Filesystems/HPFS.cs b/DiscImageChef.Filesystems/HPFS.cs index 07751e577..b5f5de1c9 100644 --- a/DiscImageChef.Filesystems/HPFS.cs +++ b/DiscImageChef.Filesystems/HPFS.cs @@ -202,61 +202,6 @@ namespace DiscImageChef.Filesystems information = sb.ToString(); } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - /// /// BIOS Parameter Block, at sector 0 /// diff --git a/DiscImageChef.Filesystems/IFilesystem.cs b/DiscImageChef.Filesystems/IFilesystem.cs index 97c84a66d..4c801c1a0 100644 --- a/DiscImageChef.Filesystems/IFilesystem.cs +++ b/DiscImageChef.Filesystems/IFilesystem.cs @@ -71,92 +71,5 @@ namespace DiscImageChef.Filesystems /// Filesystem information. /// Which encoding to use for this filesystem. void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding); - - /// - /// Initializates whatever internal structures the filesystem plugin needs to be able to read files and directories - /// from the filesystem. - /// - /// - /// - /// Which encoding to use for this filesystem. - /// If true enable debug. - Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug); - - /// - /// Frees all internal structures created by - /// - /// - Errno Unmount(); - - /// - /// Maps a filesystem block from a file to a block from the underlying device. - /// - /// Error number. - /// File path. - /// File block. - /// Device block. - Errno MapBlock(string path, long fileBlock, ref long deviceBlock); - - /// - /// Gets the attributes of a file or directory - /// - /// Error number. - /// File path. - /// File attributes. - Errno GetAttributes(string path, ref FileAttributes attributes); - - /// - /// Lists all extended attributes, alternate data streams and forks of the given file. - /// - /// Error number. - /// Path. - /// List of extended attributes, alternate data streams and forks. - Errno ListXAttr(string path, ref List xattrs); - - /// - /// Reads an extended attribute, alternate data stream or fork from the given file. - /// - /// Error number. - /// File path. - /// Extendad attribute, alternate data stream or fork name. - /// Buffer. - Errno GetXattr(string path, string xattr, ref byte[] buf); - - /// - /// Reads data from a file (main/only data stream or data fork). - /// - /// File path. - /// Offset. - /// Bytes to read. - /// Buffer. - Errno Read(string path, long offset, long size, ref byte[] buf); - - /// - /// Lists contents from a directory. - /// - /// Directory path. - /// Directory contents. - Errno ReadDir(string path, ref List contents); - - /// - /// Gets information about the mounted volume. - /// - /// Information about the mounted volume. - Errno StatFs(ref FileSystemInfo stat); - - /// - /// Gets information about a file or directory. - /// - /// File path. - /// File information. - Errno Stat(string path, ref FileEntryInfo stat); - - /// - /// Solves a symbolic link. - /// - /// Link path. - /// Link destination. - Errno ReadLink(string path, ref string dest); } } \ No newline at end of file diff --git a/DiscImageChef.Filesystems/IReadOnlyFilesystem.cs b/DiscImageChef.Filesystems/IReadOnlyFilesystem.cs new file mode 100644 index 000000000..9ec35fd20 --- /dev/null +++ b/DiscImageChef.Filesystems/IReadOnlyFilesystem.cs @@ -0,0 +1,135 @@ +// /*************************************************************************** +// The Disc Image Chef +// ---------------------------------------------------------------------------- +// +// Filename : IReadOnlyFilesystem.cs +// Author(s) : Natalia Portillo +// +// Component : Filesystem plugins. +// +// --[ Description ] ---------------------------------------------------------- +// +// Interface for filesystem plugins that offer read-only support of their +// contents. +// +// --[ 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-2018 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Collections.Generic; +using System.Text; +using DiscImageChef.CommonTypes; +using DiscImageChef.DiscImages; +using Schemas; + +namespace DiscImageChef.Filesystems +{ + /// + /// Interface to implement filesystem plugins. + /// + public interface IReadOnlyFilesystem : IFilesystem + { + /// + /// Initializates whatever internal structures the filesystem plugin needs to be able to read files and directories + /// from the filesystem. + /// + /// + /// + /// Which encoding to use for this filesystem. + /// If true enable debug. + Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug); + + /// + /// Frees all internal structures created by + /// + /// + Errno Unmount(); + + /// + /// Maps a filesystem block from a file to a block from the underlying device. + /// + /// Error number. + /// File path. + /// File block. + /// Device block. + Errno MapBlock(string path, long fileBlock, ref long deviceBlock); + + /// + /// Gets the attributes of a file or directory + /// + /// Error number. + /// File path. + /// File attributes. + Errno GetAttributes(string path, ref FileAttributes attributes); + + /// + /// Lists all extended attributes, alternate data streams and forks of the given file. + /// + /// Error number. + /// Path. + /// List of extended attributes, alternate data streams and forks. + Errno ListXAttr(string path, ref List xattrs); + + /// + /// Reads an extended attribute, alternate data stream or fork from the given file. + /// + /// Error number. + /// File path. + /// Extendad attribute, alternate data stream or fork name. + /// Buffer. + Errno GetXattr(string path, string xattr, ref byte[] buf); + + /// + /// Reads data from a file (main/only data stream or data fork). + /// + /// File path. + /// Offset. + /// Bytes to read. + /// Buffer. + Errno Read(string path, long offset, long size, ref byte[] buf); + + /// + /// Lists contents from a directory. + /// + /// Directory path. + /// Directory contents. + Errno ReadDir(string path, ref List contents); + + /// + /// Gets information about the mounted volume. + /// + /// Information about the mounted volume. + Errno StatFs(ref FileSystemInfo stat); + + /// + /// Gets information about a file or directory. + /// + /// File path. + /// File information. + Errno Stat(string path, ref FileEntryInfo stat); + + /// + /// Solves a symbolic link. + /// + /// Link path. + /// Link destination. + Errno ReadLink(string path, ref string dest); + } +} \ No newline at end of file diff --git a/DiscImageChef.Filesystems/ISO9660/Dir.cs b/DiscImageChef.Filesystems/ISO9660/Dir.cs deleted file mode 100644 index 3d964061e..000000000 --- a/DiscImageChef.Filesystems/ISO9660/Dir.cs +++ /dev/null @@ -1,49 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : Dir.cs -// Author(s) : Natalia Portillo -// -// Component : ISO9660 filesystem plugin. -// -// --[ Description ] ---------------------------------------------------------- -// -// Methods to handle directories in the ISO9660 filesystem. -// -// --[ 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-2018 Natalia Portillo -// ****************************************************************************/ - -using System.Collections.Generic; - -namespace DiscImageChef.Filesystems.ISO9660 -{ - public partial class ISO9660 - { - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - } -} \ No newline at end of file diff --git a/DiscImageChef.Filesystems/ISO9660/Extent.cs b/DiscImageChef.Filesystems/ISO9660/Extent.cs deleted file mode 100644 index a49c2143a..000000000 --- a/DiscImageChef.Filesystems/ISO9660/Extent.cs +++ /dev/null @@ -1,42 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : Extent.cs -// Author(s) : Natalia Portillo -// -// Component : ISO9660 filesystem plugin. -// -// --[ Description ] ---------------------------------------------------------- -// -// Methods to handle ISO9660 filesystem extents. -// -// --[ 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-2018 Natalia Portillo -// ****************************************************************************/ - -namespace DiscImageChef.Filesystems.ISO9660 -{ - public partial class ISO9660 - { - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - } -} \ No newline at end of file diff --git a/DiscImageChef.Filesystems/ISO9660/File.cs b/DiscImageChef.Filesystems/ISO9660/File.cs deleted file mode 100644 index 75cdf9393..000000000 --- a/DiscImageChef.Filesystems/ISO9660/File.cs +++ /dev/null @@ -1,52 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : File.cs -// Author(s) : Natalia Portillo -// -// Component : ISO9660 filesystem plugin. -// -// --[ Description ] ---------------------------------------------------------- -// -// Methods to handle files. -// -// --[ 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-2018 Natalia Portillo -// ****************************************************************************/ - -namespace DiscImageChef.Filesystems.ISO9660 -{ - public partial class ISO9660 - { - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - } -} \ No newline at end of file diff --git a/DiscImageChef.Filesystems/ISO9660/Super.cs b/DiscImageChef.Filesystems/ISO9660/Super.cs deleted file mode 100644 index 89c405381..000000000 --- a/DiscImageChef.Filesystems/ISO9660/Super.cs +++ /dev/null @@ -1,56 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : Super.cs -// Author(s) : Natalia Portillo -// -// Component : ISO9660 filesystem plugin. -// -// --[ Description ] ---------------------------------------------------------- -// -// Handles mounting and umounting the ISO9660 filesystem. -// -// --[ 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-2018 Natalia Portillo -// ****************************************************************************/ - -using System.Text; -using DiscImageChef.CommonTypes; -using DiscImageChef.DiscImages; - -namespace DiscImageChef.Filesystems.ISO9660 -{ - public partial class ISO9660 - { - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - } -} \ No newline at end of file diff --git a/DiscImageChef.Filesystems/ISO9660/Xattr.cs b/DiscImageChef.Filesystems/ISO9660/Xattr.cs deleted file mode 100644 index 9322d9f9e..000000000 --- a/DiscImageChef.Filesystems/ISO9660/Xattr.cs +++ /dev/null @@ -1,49 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : Xattr.cs -// Author(s) : Natalia Portillo -// -// Component : ISO9660 filesystem plugin. -// -// --[ Description ] ---------------------------------------------------------- -// -// Methods to handle ISO9660 extended attributes. -// -// --[ 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-2018 Natalia Portillo -// ****************************************************************************/ - -using System.Collections.Generic; - -namespace DiscImageChef.Filesystems.ISO9660 -{ - public partial class ISO9660 - { - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - } -} \ No newline at end of file diff --git a/DiscImageChef.Filesystems/JFS.cs b/DiscImageChef.Filesystems/JFS.cs index 5147c6414..2c93fb7de 100644 --- a/DiscImageChef.Filesystems/JFS.cs +++ b/DiscImageChef.Filesystems/JFS.cs @@ -140,61 +140,6 @@ namespace DiscImageChef.Filesystems information = sb.ToString(); } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - [Flags] enum JFS_Flags : uint { diff --git a/DiscImageChef.Filesystems/LIF.cs b/DiscImageChef.Filesystems/LIF.cs index 034c78953..33369096b 100644 --- a/DiscImageChef.Filesystems/LIF.cs +++ b/DiscImageChef.Filesystems/LIF.cs @@ -105,61 +105,6 @@ namespace DiscImageChef.Filesystems }; } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - [StructLayout(LayoutKind.Sequential, Pack = 1)] struct LIF_SystemBlock { diff --git a/DiscImageChef.Filesystems/LisaFS/LisaFS.cs b/DiscImageChef.Filesystems/LisaFS/LisaFS.cs index b11f8b50f..0c7099782 100644 --- a/DiscImageChef.Filesystems/LisaFS/LisaFS.cs +++ b/DiscImageChef.Filesystems/LisaFS/LisaFS.cs @@ -42,7 +42,7 @@ namespace DiscImageChef.Filesystems.LisaFS { // All information by Natalia Portillo // Variable names from Lisa API - public partial class LisaFS : IFilesystem + public partial class LisaFS : IReadOnlyFilesystem { IMediaImage device; Encoding currentEncoding; diff --git a/DiscImageChef.Filesystems/LisaFS/Xattr.cs b/DiscImageChef.Filesystems/LisaFS/Xattr.cs index 0923a4053..79c8850d1 100644 --- a/DiscImageChef.Filesystems/LisaFS/Xattr.cs +++ b/DiscImageChef.Filesystems/LisaFS/Xattr.cs @@ -190,7 +190,7 @@ namespace DiscImageChef.Filesystems.LisaFS /// Error number. /// Sector tag. /// Decoded sector tag. - Errno DecodeTag(byte[] tag, out LisaTag.PriamTag decoded) + static Errno DecodeTag(byte[] tag, out LisaTag.PriamTag decoded) { decoded = new LisaTag.PriamTag(); LisaTag.PriamTag? pmTag = LisaTag.DecodeTag(tag); diff --git a/DiscImageChef.Filesystems/Locus.cs b/DiscImageChef.Filesystems/Locus.cs index a3009c9a5..b6091f05a 100644 --- a/DiscImageChef.Filesystems/Locus.cs +++ b/DiscImageChef.Filesystems/Locus.cs @@ -218,61 +218,6 @@ namespace DiscImageChef.Filesystems }; } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - [SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "BuiltInTypeReferenceStyle")] [StructLayout(LayoutKind.Sequential, Pack = 1)] diff --git a/DiscImageChef.Filesystems/MicroDOS.cs b/DiscImageChef.Filesystems/MicroDOS.cs index 3bb242c9a..e5d541c21 100644 --- a/DiscImageChef.Filesystems/MicroDOS.cs +++ b/DiscImageChef.Filesystems/MicroDOS.cs @@ -106,61 +106,6 @@ namespace DiscImageChef.Filesystems information = sb.ToString(); } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - // Followed by directory entries [StructLayout(LayoutKind.Sequential, Pack = 1)] struct MicroDOSBlock0 diff --git a/DiscImageChef.Filesystems/MinixFS.cs b/DiscImageChef.Filesystems/MinixFS.cs index ca7e1945a..eded5f8e5 100644 --- a/DiscImageChef.Filesystems/MinixFS.cs +++ b/DiscImageChef.Filesystems/MinixFS.cs @@ -304,61 +304,6 @@ namespace DiscImageChef.Filesystems information = sb.ToString(); } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - /// /// Superblock for Minix v1 and V2 filesystems /// diff --git a/DiscImageChef.Filesystems/NILFS2.cs b/DiscImageChef.Filesystems/NILFS2.cs index f563b39b3..7681f3fff 100644 --- a/DiscImageChef.Filesystems/NILFS2.cs +++ b/DiscImageChef.Filesystems/NILFS2.cs @@ -139,61 +139,6 @@ namespace DiscImageChef.Filesystems xmlFsType.Clusters = (long)nilfsSb.dev_size / xmlFsType.ClusterSize; } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - enum NILFS2_State : ushort { Valid = 0x0001, diff --git a/DiscImageChef.Filesystems/NTFS.cs b/DiscImageChef.Filesystems/NTFS.cs index a3c06f66a..c9f0cdd8c 100644 --- a/DiscImageChef.Filesystems/NTFS.cs +++ b/DiscImageChef.Filesystems/NTFS.cs @@ -145,61 +145,6 @@ namespace DiscImageChef.Filesystems information = sb.ToString(); } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - /// /// NTFS $BOOT /// diff --git a/DiscImageChef.Filesystems/Nintendo.cs b/DiscImageChef.Filesystems/Nintendo.cs index f31f10aaa..290f879e6 100644 --- a/DiscImageChef.Filesystems/Nintendo.cs +++ b/DiscImageChef.Filesystems/Nintendo.cs @@ -396,61 +396,6 @@ namespace DiscImageChef.Filesystems return $"unknown type {type}"; } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - struct NintendoFields { public string DiscType; diff --git a/DiscImageChef.Filesystems/ODS.cs b/DiscImageChef.Filesystems/ODS.cs index 26a169662..277aecc0e 100644 --- a/DiscImageChef.Filesystems/ODS.cs +++ b/DiscImageChef.Filesystems/ODS.cs @@ -229,61 +229,6 @@ namespace DiscImageChef.Filesystems information = sb.ToString(); } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - [StructLayout(LayoutKind.Sequential, Pack = 1)] struct OdsHomeBlock { diff --git a/DiscImageChef.Filesystems/Opera.cs b/DiscImageChef.Filesystems/Opera.cs index e2a989cff..cfaf137d2 100644 --- a/DiscImageChef.Filesystems/Opera.cs +++ b/DiscImageChef.Filesystems/Opera.cs @@ -129,61 +129,6 @@ namespace DiscImageChef.Filesystems }; } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - [StructLayout(LayoutKind.Sequential, Pack = 1)] struct OperaSuperBlock { diff --git a/DiscImageChef.Filesystems/PCEngine.cs b/DiscImageChef.Filesystems/PCEngine.cs index 1226f26bd..a8cb0637f 100644 --- a/DiscImageChef.Filesystems/PCEngine.cs +++ b/DiscImageChef.Filesystems/PCEngine.cs @@ -72,60 +72,5 @@ namespace DiscImageChef.Filesystems ClusterSize = 2048 }; } - - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } } } \ No newline at end of file diff --git a/DiscImageChef.Filesystems/PFS.cs b/DiscImageChef.Filesystems/PFS.cs index 40b82e25e..de20f7283 100644 --- a/DiscImageChef.Filesystems/PFS.cs +++ b/DiscImageChef.Filesystems/PFS.cs @@ -141,61 +141,6 @@ namespace DiscImageChef.Filesystems xmlFsType.VolumeName = StringHandlers.PascalToString(rootBlock.diskname, currentEncoding); } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - /// /// Boot block, first 2 sectors /// diff --git a/DiscImageChef.Filesystems/ProDOS.cs b/DiscImageChef.Filesystems/ProDOS.cs index 66beb9ee5..537f53d26 100644 --- a/DiscImageChef.Filesystems/ProDOS.cs +++ b/DiscImageChef.Filesystems/ProDOS.cs @@ -311,61 +311,6 @@ namespace DiscImageChef.Filesystems xmlFsType.Type = "ProDOS"; } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - /// /// ProDOS directory entry, decoded structure /// diff --git a/DiscImageChef.Filesystems/QNX4.cs b/DiscImageChef.Filesystems/QNX4.cs index 5e8ae5ac3..e34693ccf 100644 --- a/DiscImageChef.Filesystems/QNX4.cs +++ b/DiscImageChef.Filesystems/QNX4.cs @@ -190,61 +190,6 @@ namespace DiscImageChef.Filesystems xmlFsType.Bootable |= qnxSb.boot.di_size != 0 || qnxSb.altBoot.di_size != 0; } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - struct QNX4_Extent { public uint block; diff --git a/DiscImageChef.Filesystems/QNX6.cs b/DiscImageChef.Filesystems/QNX6.cs index 8f69df89e..272f87243 100644 --- a/DiscImageChef.Filesystems/QNX6.cs +++ b/DiscImageChef.Filesystems/QNX6.cs @@ -171,61 +171,6 @@ namespace DiscImageChef.Filesystems information = sb.ToString(); } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - [StructLayout(LayoutKind.Sequential, Pack = 1)] struct QNX6_RootNode { diff --git a/DiscImageChef.Filesystems/RBF.cs b/DiscImageChef.Filesystems/RBF.cs index b0e83103b..c4180a086 100644 --- a/DiscImageChef.Filesystems/RBF.cs +++ b/DiscImageChef.Filesystems/RBF.cs @@ -226,61 +226,6 @@ namespace DiscImageChef.Filesystems return (uint)((lsn[0] << 16) + (lsn[1] << 8) + lsn[2]); } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - /// /// Identification sector. Wherever the sector this resides on, becomes LSN 0. /// diff --git a/DiscImageChef.Filesystems/RT11.cs b/DiscImageChef.Filesystems/RT11.cs index a31058c0d..afd7bcb9e 100644 --- a/DiscImageChef.Filesystems/RT11.cs +++ b/DiscImageChef.Filesystems/RT11.cs @@ -118,61 +118,6 @@ namespace DiscImageChef.Filesystems information = sb.ToString(); } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - [StructLayout(LayoutKind.Sequential, Pack = 1)] struct RT11HomeBlock { diff --git a/DiscImageChef.Filesystems/Reiser.cs b/DiscImageChef.Filesystems/Reiser.cs index acdaa3435..822bf3671 100644 --- a/DiscImageChef.Filesystems/Reiser.cs +++ b/DiscImageChef.Filesystems/Reiser.cs @@ -143,61 +143,6 @@ namespace DiscImageChef.Filesystems xmlFsType.VolumeSerial = reiserSb.uuid.ToString(); } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - [StructLayout(LayoutKind.Sequential, Pack = 1)] struct ReiserJournalParams { diff --git a/DiscImageChef.Filesystems/Reiser4.cs b/DiscImageChef.Filesystems/Reiser4.cs index b87a5cc42..2e3c91b84 100644 --- a/DiscImageChef.Filesystems/Reiser4.cs +++ b/DiscImageChef.Filesystems/Reiser4.cs @@ -125,61 +125,6 @@ namespace DiscImageChef.Filesystems }; } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - [StructLayout(LayoutKind.Sequential, Pack = 1)] struct Reiser4_Superblock { diff --git a/DiscImageChef.Filesystems/SFS.cs b/DiscImageChef.Filesystems/SFS.cs index ca9450ff2..d278408cd 100644 --- a/DiscImageChef.Filesystems/SFS.cs +++ b/DiscImageChef.Filesystems/SFS.cs @@ -110,61 +110,6 @@ namespace DiscImageChef.Filesystems }; } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - [Flags] enum SFSFlags : byte { diff --git a/DiscImageChef.Filesystems/SolarFS.cs b/DiscImageChef.Filesystems/SolarFS.cs index cae882070..54a0ed571 100644 --- a/DiscImageChef.Filesystems/SolarFS.cs +++ b/DiscImageChef.Filesystems/SolarFS.cs @@ -160,61 +160,6 @@ namespace DiscImageChef.Filesystems information = sb.ToString(); } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - struct SolarOSParameterBlock { /// 0x00, x86 jump (3 bytes), jumps to 0x60 diff --git a/DiscImageChef.Filesystems/Squash.cs b/DiscImageChef.Filesystems/Squash.cs index baf1ac04b..9d067043c 100644 --- a/DiscImageChef.Filesystems/Squash.cs +++ b/DiscImageChef.Filesystems/Squash.cs @@ -143,61 +143,6 @@ namespace DiscImageChef.Filesystems }; } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - enum SquashCompression : ushort { Zlib = 1, diff --git a/DiscImageChef.Filesystems/SysV.cs b/DiscImageChef.Filesystems/SysV.cs index 871f8e4e6..ab49a92d2 100644 --- a/DiscImageChef.Filesystems/SysV.cs +++ b/DiscImageChef.Filesystems/SysV.cs @@ -669,61 +669,6 @@ namespace DiscImageChef.Filesystems BigEndianBitConverter.IsLittleEndian = false; // Return to default (bigendian) } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - // Old XENIX use different offsets struct XenixSuperBlock { diff --git a/DiscImageChef.Filesystems/UCSDPascal/UCSDPascal.cs b/DiscImageChef.Filesystems/UCSDPascal/UCSDPascal.cs index 2cbcb2bc9..304ebbc1a 100644 --- a/DiscImageChef.Filesystems/UCSDPascal/UCSDPascal.cs +++ b/DiscImageChef.Filesystems/UCSDPascal/UCSDPascal.cs @@ -41,7 +41,7 @@ using Encoding = System.Text.Encoding; namespace DiscImageChef.Filesystems.UCSDPascal { // Information from Call-A.P.P.L.E. Pascal Disk Directory Structure - public partial class PascalPlugin : IFilesystem + public partial class PascalPlugin : IReadOnlyFilesystem { IMediaImage device; byte[] bootBlocks; diff --git a/DiscImageChef.Filesystems/UDF.cs b/DiscImageChef.Filesystems/UDF.cs index 80d27b964..9993d1338 100644 --- a/DiscImageChef.Filesystems/UDF.cs +++ b/DiscImageChef.Filesystems/UDF.cs @@ -300,61 +300,6 @@ namespace DiscImageChef.Filesystems timestamp.microseconds); } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - [Flags] enum EntityFlags : byte { diff --git a/DiscImageChef.Filesystems/UNICOS.cs b/DiscImageChef.Filesystems/UNICOS.cs index 23fa03506..9261e2dae 100644 --- a/DiscImageChef.Filesystems/UNICOS.cs +++ b/DiscImageChef.Filesystems/UNICOS.cs @@ -133,61 +133,6 @@ namespace DiscImageChef.Filesystems xmlFsType.Dirty |= unicosSb.s_error > 0; } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - [StructLayout(LayoutKind.Sequential, Pack = 1)] [SuppressMessage("ReSharper", "InconsistentNaming")] struct nc1ireg_sb diff --git a/DiscImageChef.Filesystems/UNIXBFS.cs b/DiscImageChef.Filesystems/UNIXBFS.cs index deacb7697..bc91193ba 100644 --- a/DiscImageChef.Filesystems/UNIXBFS.cs +++ b/DiscImageChef.Filesystems/UNIXBFS.cs @@ -105,70 +105,17 @@ namespace DiscImageChef.Filesystems sb.AppendFormat("Filesystem name: {0}", bfsSb.s_fsname).AppendLine(); sb.AppendFormat("Volume name: {0}", bfsSb.s_volume).AppendLine(); - xmlFsType = new FileSystemType(); - xmlFsType.Type = "BFS"; - xmlFsType.VolumeName = bfsSb.s_volume; - xmlFsType.ClusterSize = (int)imagePlugin.Info.SectorSize; - xmlFsType.Clusters = (long)(partition.End - partition.Start + 1); + xmlFsType = new FileSystemType + { + Type = "BFS", + VolumeName = bfsSb.s_volume, + ClusterSize = (int)imagePlugin.Info.SectorSize, + Clusters = (long)(partition.End - partition.Start + 1) + }; information = sb.ToString(); } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - struct BFSSuperBlock { /// 0x00, 0x1BADFACE diff --git a/DiscImageChef.Filesystems/VMfs.cs b/DiscImageChef.Filesystems/VMfs.cs index b2822269e..f892ff418 100644 --- a/DiscImageChef.Filesystems/VMfs.cs +++ b/DiscImageChef.Filesystems/VMfs.cs @@ -118,61 +118,6 @@ namespace DiscImageChef.Filesystems }; } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - [Flags] enum VMfsFlags : byte { diff --git a/DiscImageChef.Filesystems/VxFS.cs b/DiscImageChef.Filesystems/VxFS.cs index 2272d73e9..e15e93fb6 100644 --- a/DiscImageChef.Filesystems/VxFS.cs +++ b/DiscImageChef.Filesystems/VxFS.cs @@ -116,61 +116,6 @@ namespace DiscImageChef.Filesystems }; } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - [StructLayout(LayoutKind.Sequential, Pack = 1)] struct VxSuperBlock { diff --git a/DiscImageChef.Filesystems/XFS.cs b/DiscImageChef.Filesystems/XFS.cs index 34c063d84..f54a8bc59 100644 --- a/DiscImageChef.Filesystems/XFS.cs +++ b/DiscImageChef.Filesystems/XFS.cs @@ -186,61 +186,6 @@ namespace DiscImageChef.Filesystems }; } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - [StructLayout(LayoutKind.Sequential, Pack = 1)] struct XFS_Superblock { diff --git a/DiscImageChef.Filesystems/Xia.cs b/DiscImageChef.Filesystems/Xia.cs index e4127eed6..9978df0e0 100644 --- a/DiscImageChef.Filesystems/Xia.cs +++ b/DiscImageChef.Filesystems/Xia.cs @@ -119,61 +119,6 @@ namespace DiscImageChef.Filesystems information = sb.ToString(); } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - /// /// Xia superblock /// diff --git a/DiscImageChef.Filesystems/ZFS.cs b/DiscImageChef.Filesystems/ZFS.cs index 9f70c5480..feb948e52 100644 --- a/DiscImageChef.Filesystems/ZFS.cs +++ b/DiscImageChef.Filesystems/ZFS.cs @@ -626,61 +626,6 @@ namespace DiscImageChef.Filesystems return sb.ToString(); } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - struct ZIO_Checksum { [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] public ulong[] word; diff --git a/DiscImageChef.Filesystems/dump.cs b/DiscImageChef.Filesystems/dump.cs index 50d859331..abc92da84 100644 --- a/DiscImageChef.Filesystems/dump.cs +++ b/DiscImageChef.Filesystems/dump.cs @@ -299,61 +299,6 @@ namespace DiscImageChef.Filesystems information = sb.ToString(); } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - // Old 16-bit format record [StructLayout(LayoutKind.Sequential, Pack = 1)] struct spcl16 diff --git a/DiscImageChef.Filesystems/exFAT.cs b/DiscImageChef.Filesystems/exFAT.cs index 6833ac5ef..48367f83d 100644 --- a/DiscImageChef.Filesystems/exFAT.cs +++ b/DiscImageChef.Filesystems/exFAT.cs @@ -148,61 +148,6 @@ namespace DiscImageChef.Filesystems information = sb.ToString(); } - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - throw new NotImplementedException(); - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - throw new NotImplementedException(); - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - throw new NotImplementedException(); - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - throw new NotImplementedException(); - } - - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - throw new NotImplementedException(); - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - throw new NotImplementedException(); - } - - public virtual Errno ReadDir(string path, ref List contents) - { - throw new NotImplementedException(); - } - - public virtual Errno ReadLink(string path, ref string dest) - { - throw new NotImplementedException(); - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - throw new NotImplementedException(); - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - throw new NotImplementedException(); - } - - public virtual Errno Unmount() - { - throw new NotImplementedException(); - } - [Flags] enum VolumeFlags : ushort { diff --git a/DiscImageChef.Filesystems/ext2FS.cs b/DiscImageChef.Filesystems/ext2FS.cs index d2e0a19fe..70509b7b3 100644 --- a/DiscImageChef.Filesystems/ext2FS.cs +++ b/DiscImageChef.Filesystems/ext2FS.cs @@ -631,61 +631,6 @@ namespace DiscImageChef.Filesystems information = sb.ToString(); } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - /// /// ext2/3/4 superblock /// diff --git a/DiscImageChef.Filesystems/extFS.cs b/DiscImageChef.Filesystems/extFS.cs index b30209703..8a667ef2e 100644 --- a/DiscImageChef.Filesystems/extFS.cs +++ b/DiscImageChef.Filesystems/extFS.cs @@ -130,61 +130,6 @@ namespace DiscImageChef.Filesystems information = sb.ToString(); } - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) - { - return Errno.NotImplemented; - } - - public virtual Errno Unmount() - { - return Errno.NotImplemented; - } - - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) - { - return Errno.NotImplemented; - } - - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) - { - return Errno.NotImplemented; - } - - public virtual Errno ListXAttr(string path, ref List xattrs) - { - return Errno.NotImplemented; - } - - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadDir(string path, ref List contents) - { - return Errno.NotImplemented; - } - - public virtual Errno StatFs(ref FileSystemInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno Stat(string path, ref FileEntryInfo stat) - { - return Errno.NotImplemented; - } - - public virtual Errno ReadLink(string path, ref string dest) - { - return Errno.NotImplemented; - } - /// /// ext superblock /// diff --git a/DiscImageChef/Commands/ExtractFiles.cs b/DiscImageChef/Commands/ExtractFiles.cs index a08271c41..efedf61a9 100644 --- a/DiscImageChef/Commands/ExtractFiles.cs +++ b/DiscImageChef/Commands/ExtractFiles.cs @@ -134,7 +134,7 @@ namespace DiscImageChef.Commands Core.Partitions.AddSchemesToStats(partitions); List idPlugins; - IFilesystem plugin; + IReadOnlyFilesystem plugin; Errno error; if(partitions.Count == 0) DicConsole.DebugWriteLine("Extract-Files command", "No partitions found"); else @@ -155,10 +155,10 @@ namespace DiscImageChef.Commands DicConsole.WriteLine($"Identified by {idPlugins.Count} plugins"); foreach(string pluginName in idPlugins) - if(plugins.PluginsList.TryGetValue(pluginName, out plugin)) + if(plugins.ReadOnlyFilesystems.TryGetValue(pluginName, out plugin)) { DicConsole.WriteLine($"As identified by {plugin.Name}."); - IFilesystem fs = (IFilesystem)plugin + IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin .GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { }); error = fs.Mount(imageFormat, partitions[i], encoding, options.Debug); @@ -307,9 +307,9 @@ namespace DiscImageChef.Commands } else { - plugins.PluginsList.TryGetValue(idPlugins[0], out plugin); + plugins.ReadOnlyFilesystems.TryGetValue(idPlugins[0], out plugin); DicConsole.WriteLine($"Identified by {plugin.Name}."); - IFilesystem fs = (IFilesystem)plugin + IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin .GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { }); error = fs.Mount(imageFormat, partitions[i], encoding, options.Debug); if(error == Errno.NoError) @@ -462,10 +462,10 @@ namespace DiscImageChef.Commands DicConsole.WriteLine($"Identified by {idPlugins.Count} plugins"); foreach(string pluginName in idPlugins) - if(plugins.PluginsList.TryGetValue(pluginName, out plugin)) + if(plugins.ReadOnlyFilesystems.TryGetValue(pluginName, out plugin)) { DicConsole.WriteLine($"As identified by {plugin.Name}."); - IFilesystem fs = (IFilesystem)plugin + IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin .GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { }); error = fs.Mount(imageFormat, wholePart, encoding, options.Debug); if(error == Errno.NoError) @@ -604,9 +604,9 @@ namespace DiscImageChef.Commands } else { - plugins.PluginsList.TryGetValue(idPlugins[0], out plugin); + plugins.ReadOnlyFilesystems.TryGetValue(idPlugins[0], out plugin); DicConsole.WriteLine($"Identified by {plugin.Name}."); - IFilesystem fs = (IFilesystem)plugin + IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin .GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { }); error = fs.Mount(imageFormat, wholePart, encoding, options.Debug); if(error == Errno.NoError) diff --git a/DiscImageChef/Commands/Formats.cs b/DiscImageChef/Commands/Formats.cs index 8ff563f1b..5cba693ac 100644 --- a/DiscImageChef/Commands/Formats.cs +++ b/DiscImageChef/Commands/Formats.cs @@ -31,6 +31,7 @@ // ****************************************************************************/ using System.Collections.Generic; +using System.Linq; using DiscImageChef.Console; using DiscImageChef.Core; using DiscImageChef.DiscImages; @@ -47,14 +48,14 @@ namespace DiscImageChef.Commands PluginBase plugins = new PluginBase(); FiltersList filtersList = new FiltersList(); - DicConsole.WriteLine("Supported filters:"); + DicConsole.WriteLine("Supported filters ({0}):", filtersList.Filters.Count); if(formatsOptions.Verbose) DicConsole.VerboseWriteLine("GUID\t\t\t\t\tFilter"); foreach(KeyValuePair kvp in filtersList.Filters) if(formatsOptions.Verbose) DicConsole.VerboseWriteLine("{0}\t{1}", kvp.Value.Id, kvp.Value.Name); else DicConsole.WriteLine(kvp.Value.Name); DicConsole.WriteLine(); - DicConsole.WriteLine("Supported disc image formats:"); + DicConsole.WriteLine("Supported disc image formats ({0}):", plugins.ImagePluginsList.Count); if(formatsOptions.Verbose) DicConsole.VerboseWriteLine("GUID\t\t\t\t\tPlugin"); foreach(KeyValuePair kvp in plugins.ImagePluginsList) if(formatsOptions.Verbose) @@ -62,15 +63,23 @@ namespace DiscImageChef.Commands else DicConsole.WriteLine(kvp.Value.Name); DicConsole.WriteLine(); - DicConsole.WriteLine("Supported filesystems:"); + DicConsole.WriteLine("Supported filesystems for identification and information only ({0}):", plugins.PluginsList.Count(t => !t.Value.GetType().GetInterfaces().Contains(typeof(IReadOnlyFilesystem)))); if(formatsOptions.Verbose) DicConsole.VerboseWriteLine("GUID\t\t\t\t\tPlugin"); - foreach(KeyValuePair kvp in plugins.PluginsList) + foreach(KeyValuePair kvp in plugins.PluginsList.Where(t => !t.Value.GetType().GetInterfaces().Contains(typeof(IReadOnlyFilesystem)))) if(formatsOptions.Verbose) DicConsole.VerboseWriteLine("{0}\t{1}", kvp.Value.Id, kvp.Value.Name); else DicConsole.WriteLine(kvp.Value.Name); DicConsole.WriteLine(); - DicConsole.WriteLine("Supported partitioning schemes:"); + DicConsole.WriteLine("Supported filesystems that can read their contents ({0}):", plugins.ReadOnlyFilesystems.Count); + if(formatsOptions.Verbose) DicConsole.VerboseWriteLine("GUID\t\t\t\t\tPlugin"); + foreach(KeyValuePair kvp in plugins.ReadOnlyFilesystems) + if(formatsOptions.Verbose) + DicConsole.VerboseWriteLine("{0}\t{1}", kvp.Value.Id, kvp.Value.Name); + else DicConsole.WriteLine(kvp.Value.Name); + + DicConsole.WriteLine(); + DicConsole.WriteLine("Supported partitioning schemes ({0}):", plugins.PartPluginsList.Count); if(formatsOptions.Verbose) DicConsole.VerboseWriteLine("GUID\t\t\t\t\tPlugin"); foreach(KeyValuePair kvp in plugins.PartPluginsList) if(formatsOptions.Verbose) diff --git a/DiscImageChef/Commands/Ls.cs b/DiscImageChef/Commands/Ls.cs index e5ed4698b..71f40041b 100644 --- a/DiscImageChef/Commands/Ls.cs +++ b/DiscImageChef/Commands/Ls.cs @@ -121,7 +121,7 @@ namespace DiscImageChef.Commands Core.Partitions.AddSchemesToStats(partitions); List idPlugins; - IFilesystem plugin; + IReadOnlyFilesystem plugin; Errno error; if(partitions.Count == 0) DicConsole.DebugWriteLine("Ls command", "No partitions found"); else @@ -142,10 +142,10 @@ namespace DiscImageChef.Commands DicConsole.WriteLine($"Identified by {idPlugins.Count} plugins"); foreach(string pluginName in idPlugins) - if(plugins.PluginsList.TryGetValue(pluginName, out plugin)) + if(plugins.ReadOnlyFilesystems.TryGetValue(pluginName, out plugin)) { DicConsole.WriteLine($"As identified by {plugin.Name}."); - IFilesystem fs = (IFilesystem)plugin + IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin .GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { }); if(fs == null) continue; @@ -170,11 +170,11 @@ namespace DiscImageChef.Commands } else { - plugins.PluginsList.TryGetValue(idPlugins[0], out plugin); + plugins.ReadOnlyFilesystems.TryGetValue(idPlugins[0], out plugin); if(plugin == null) continue; DicConsole.WriteLine($"Identified by {plugin.Name}."); - IFilesystem fs = (IFilesystem)plugin + IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin .GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { }); if(fs == null) continue; @@ -209,10 +209,10 @@ namespace DiscImageChef.Commands DicConsole.WriteLine($"Identified by {idPlugins.Count} plugins"); foreach(string pluginName in idPlugins) - if(plugins.PluginsList.TryGetValue(pluginName, out plugin)) + if(plugins.ReadOnlyFilesystems.TryGetValue(pluginName, out plugin)) { DicConsole.WriteLine($"As identified by {plugin.Name}."); - IFilesystem fs = (IFilesystem)plugin + IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin .GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { }); if(fs == null) continue; @@ -233,11 +233,11 @@ namespace DiscImageChef.Commands } else { - plugins.PluginsList.TryGetValue(idPlugins[0], out plugin); + plugins.ReadOnlyFilesystems.TryGetValue(idPlugins[0], out plugin); if(plugin != null) { DicConsole.WriteLine($"Identified by {plugin.Name}."); - IFilesystem fs = (IFilesystem)plugin + IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin .GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { }); if(fs != null) {