mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
* DiscImageChef.Filesystems/Structs.cs:
Added structs for filesystem entries information. * DiscImageChef/Plugins.cs: * DiscImageChef.Filesystems/FFS.cs: * DiscImageChef.Filesystems/FAT.cs: * DiscImageChef.Filesystems/ODS.cs: * DiscImageChef.Filesystems/BFS.cs: * DiscImageChef.Filesystems/NTFS.cs: * DiscImageChef/Commands/Formats.cs: * DiscImageChef.Filesystems/APFS.cs: * DiscImageChef.Filesystems/HPFS.cs: * DiscImageChef/Commands/Analyze.cs: * DiscImageChef.Filesystems/SysV.cs: * DiscImageChef.Filesystems/Acorn.cs: * DiscImageChef.Filesystems/Opera.cs: * DiscImageChef.Filesystems/extFS.cs: * DiscImageChef.Filesystems/BTRFS.cs: * DiscImageChef/Commands/DumpMedia.cs: * DiscImageChef.Filesystems/ProDOS.cs: * DiscImageChef.Filesystems/LisaFS.cs: * DiscImageChef.Filesystems/ext2FS.cs: * DiscImageChef.Filesystems/MinixFS.cs: * DiscImageChef.Filesystems/ISO9660.cs: * DiscImageChef.Filesystems/SolarFS.cs: * DiscImageChef.Filesystems/UNIXBFS.cs: * DiscImageChef.Filesystems/AmigaDOS.cs: * DiscImageChef.Filesystems/AppleHFS.cs: * DiscImageChef.Filesystems/PCEngine.cs: * DiscImageChef.Filesystems/AppleMFS.cs: * DiscImageChef.Filesystems/Nintendo.cs: * DiscImageChef/Commands/CreateSidecar.cs: * DiscImageChef.Filesystems/Filesystem.cs: * DiscImageChef.Filesystems/AppleHFSPlus.cs: Refactored filesystem plugin class name. * DiscImageChef.Filesystems/DiscImageChef.Filesystems.csproj: Refactored filesystem plugin class name. Added structs for filesystem entries information.
This commit is contained in:
@@ -40,9 +40,9 @@ using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using DiscImageChef.Console;
|
||||
|
||||
namespace DiscImageChef.Plugins
|
||||
namespace DiscImageChef.Filesystems
|
||||
{
|
||||
class APFS : Plugin
|
||||
class APFS : Filesystem
|
||||
{
|
||||
const uint ApfsContainerMagic = 0x4253584E; // "NXSB"
|
||||
const uint ApfsVolumeMagic = 0x42535041; // "APSB"
|
||||
|
||||
@@ -40,9 +40,9 @@ using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using DiscImageChef.Console;
|
||||
|
||||
namespace DiscImageChef.Plugins
|
||||
namespace DiscImageChef.Filesystems
|
||||
{
|
||||
class AcornADFS : Plugin
|
||||
class AcornADFS : Filesystem
|
||||
{
|
||||
const ulong ADFS_SB_POS = 0xC00;
|
||||
|
||||
|
||||
@@ -43,9 +43,9 @@ using DiscImageChef.PartPlugins;
|
||||
using System.Collections.Generic;
|
||||
using DiscImageChef.Console;
|
||||
|
||||
namespace DiscImageChef.Plugins
|
||||
namespace DiscImageChef.Filesystems
|
||||
{
|
||||
class AmigaDOSPlugin : Plugin
|
||||
class AmigaDOSPlugin : Filesystem
|
||||
{
|
||||
public AmigaDOSPlugin()
|
||||
{
|
||||
|
||||
@@ -45,9 +45,9 @@ using DiscImageChef;
|
||||
using DiscImageChef.Console;
|
||||
|
||||
|
||||
namespace DiscImageChef.Plugins
|
||||
namespace DiscImageChef.Filesystems
|
||||
{
|
||||
class AppleHFS : Plugin
|
||||
class AppleHFS : Filesystem
|
||||
{
|
||||
/// <summary>
|
||||
/// "BD", HFS magic
|
||||
|
||||
@@ -41,9 +41,9 @@ using System.Text;
|
||||
using DiscImageChef;
|
||||
|
||||
// Information from Apple TechNote 1150: https://developer.apple.com/legacy/library/technotes/tn/tn1150.html
|
||||
namespace DiscImageChef.Plugins
|
||||
namespace DiscImageChef.Filesystems
|
||||
{
|
||||
class AppleHFSPlus : Plugin
|
||||
class AppleHFSPlus : Filesystem
|
||||
{
|
||||
/// <summary>
|
||||
/// "BD", HFS magic
|
||||
|
||||
@@ -41,9 +41,9 @@ using System.Text;
|
||||
using DiscImageChef;
|
||||
|
||||
// Information from Inside Macintosh
|
||||
namespace DiscImageChef.Plugins
|
||||
namespace DiscImageChef.Filesystems
|
||||
{
|
||||
class AppleMFS : Plugin
|
||||
class AppleMFS : Filesystem
|
||||
{
|
||||
const UInt16 MFS_MAGIC = 0xD2D7;
|
||||
// "LK"
|
||||
|
||||
@@ -41,9 +41,9 @@ using System.Text;
|
||||
using DiscImageChef;
|
||||
|
||||
// Information from Practical Filesystem Design, ISBN 1-55860-497-9
|
||||
namespace DiscImageChef.Plugins
|
||||
namespace DiscImageChef.Filesystems
|
||||
{
|
||||
class BeFS : Plugin
|
||||
class BeFS : Filesystem
|
||||
{
|
||||
// Little endian constants (that is, as read by .NET :p)
|
||||
const UInt32 BEFS_MAGIC1 = 0x42465331;
|
||||
|
||||
@@ -40,9 +40,9 @@ using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using DiscImageChef.Console;
|
||||
|
||||
namespace DiscImageChef.Plugins
|
||||
namespace DiscImageChef.Filesystems
|
||||
{
|
||||
class BTRFS : Plugin
|
||||
class BTRFS : Filesystem
|
||||
{
|
||||
/// <summary>
|
||||
/// BTRFS magic "_BHRfS_M"
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<Compile Include="ODS.cs" />
|
||||
<Compile Include="Opera.cs" />
|
||||
<Compile Include="PCEngine.cs" />
|
||||
<Compile Include="Plugin.cs" />
|
||||
<Compile Include="Filesystem.cs" />
|
||||
<Compile Include="ProDOS.cs" />
|
||||
<Compile Include="SolarFS.cs" />
|
||||
<Compile Include="Symbian.cs" />
|
||||
@@ -61,6 +61,7 @@
|
||||
<Compile Include="Nintendo.cs" />
|
||||
<Compile Include="BTRFS.cs" />
|
||||
<Compile Include="APFS.cs" />
|
||||
<Compile Include="Structs.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
|
||||
@@ -45,9 +45,9 @@ using DiscImageChef;
|
||||
using DiscImageChef.Console;
|
||||
|
||||
|
||||
namespace DiscImageChef.Plugins
|
||||
namespace DiscImageChef.Filesystems
|
||||
{
|
||||
class FAT : Plugin
|
||||
class FAT : Filesystem
|
||||
{
|
||||
public FAT()
|
||||
{
|
||||
|
||||
@@ -44,9 +44,9 @@ using DiscImageChef;
|
||||
using DiscImageChef.Console;
|
||||
|
||||
|
||||
namespace DiscImageChef.Plugins
|
||||
namespace DiscImageChef.Filesystems
|
||||
{
|
||||
public class FFSPlugin : Plugin
|
||||
public class FFSPlugin : Filesystem
|
||||
{
|
||||
public FFSPlugin()
|
||||
{
|
||||
|
||||
@@ -37,13 +37,14 @@ Copyright (C) 2011-2014 Claunia.com
|
||||
//$Id$
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace DiscImageChef.Plugins
|
||||
namespace DiscImageChef.Filesystems
|
||||
{
|
||||
/// <summary>
|
||||
/// Abstract class to implement filesystem plugins.
|
||||
/// </summary>
|
||||
public abstract class Plugin
|
||||
public abstract class Filesystem
|
||||
{
|
||||
/// <summary>Plugin name.</summary>
|
||||
public string Name;
|
||||
@@ -63,7 +64,17 @@ namespace DiscImageChef.Plugins
|
||||
}
|
||||
}
|
||||
|
||||
protected Plugin()
|
||||
protected Filesystem()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a filesystem instance prepared for reading contents
|
||||
/// </summary>
|
||||
/// <param name="imagePlugin">Image plugin.</param>
|
||||
/// <param name="partitionStart">Partition start.</param>
|
||||
/// <param name="partitionEnd">Partition end.</param>
|
||||
protected Filesystem(ImagePlugins.ImagePlugin imagePlugin, ulong partitionStart, ulong partitionEnd)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -42,9 +42,9 @@ using System.Text;
|
||||
using DiscImageChef;
|
||||
|
||||
// Information from an old unnamed document
|
||||
namespace DiscImageChef.Plugins
|
||||
namespace DiscImageChef.Filesystems
|
||||
{
|
||||
class HPFS : Plugin
|
||||
class HPFS : Filesystem
|
||||
{
|
||||
public HPFS()
|
||||
{
|
||||
|
||||
@@ -48,9 +48,9 @@ using DiscImageChef;
|
||||
using DiscImageChef.Console;
|
||||
|
||||
|
||||
namespace DiscImageChef.Plugins
|
||||
namespace DiscImageChef.Filesystems
|
||||
{
|
||||
class ISO9660Plugin : Plugin
|
||||
class ISO9660Plugin : Filesystem
|
||||
{
|
||||
//static bool alreadyLaunched;
|
||||
|
||||
|
||||
@@ -46,9 +46,9 @@ using DiscImageChef.ImagePlugins;
|
||||
using DiscImageChef.Console;
|
||||
|
||||
|
||||
namespace DiscImageChef.Plugins
|
||||
namespace DiscImageChef.Filesystems
|
||||
{
|
||||
class LisaFS : Plugin
|
||||
class LisaFS : Filesystem
|
||||
{
|
||||
const byte LisaFSv1 = 0x0E;
|
||||
const byte LisaFSv2 = 0x0F;
|
||||
|
||||
@@ -41,9 +41,9 @@ using System.Text;
|
||||
using DiscImageChef;
|
||||
|
||||
// Information from the Linux kernel
|
||||
namespace DiscImageChef.Plugins
|
||||
namespace DiscImageChef.Filesystems
|
||||
{
|
||||
class MinixFS : Plugin
|
||||
class MinixFS : Filesystem
|
||||
{
|
||||
const UInt16 MINIX_MAGIC = 0x137F;
|
||||
// Minix v1, 14 char filenames
|
||||
|
||||
@@ -41,9 +41,9 @@ using System.Text;
|
||||
using DiscImageChef;
|
||||
|
||||
// Information from Inside Windows NT
|
||||
namespace DiscImageChef.Plugins
|
||||
namespace DiscImageChef.Filesystems
|
||||
{
|
||||
class NTFS : Plugin
|
||||
class NTFS : Filesystem
|
||||
{
|
||||
public NTFS()
|
||||
{
|
||||
|
||||
@@ -44,9 +44,9 @@ using System.Collections.Generic;
|
||||
using DiscImageChef.Console;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace DiscImageChef.Plugins
|
||||
namespace DiscImageChef.Filesystems
|
||||
{
|
||||
class NintendoPlugin : Plugin
|
||||
class NintendoPlugin : Filesystem
|
||||
{
|
||||
public NintendoPlugin()
|
||||
{
|
||||
|
||||
@@ -48,9 +48,9 @@ using DiscImageChef;
|
||||
// There is an ODS with signature "DECFILES11A", yet to be seen
|
||||
// Time is a 64 bit unsigned integer, tenths of microseconds since 1858/11/17 00:00:00.
|
||||
// TODO: Implement checksum
|
||||
namespace DiscImageChef.Plugins
|
||||
namespace DiscImageChef.Filesystems
|
||||
{
|
||||
class ODS : Plugin
|
||||
class ODS : Filesystem
|
||||
{
|
||||
public ODS()
|
||||
{
|
||||
|
||||
@@ -41,9 +41,9 @@ using System.Text;
|
||||
using DiscImageChef;
|
||||
|
||||
|
||||
namespace DiscImageChef.Plugins
|
||||
namespace DiscImageChef.Filesystems
|
||||
{
|
||||
class OperaFS : Plugin
|
||||
class OperaFS : Filesystem
|
||||
{
|
||||
public OperaFS()
|
||||
{
|
||||
|
||||
@@ -40,9 +40,9 @@ using System;
|
||||
using System.Text;
|
||||
using DiscImageChef;
|
||||
|
||||
namespace DiscImageChef.Plugins
|
||||
namespace DiscImageChef.Filesystems
|
||||
{
|
||||
class PCEnginePlugin : Plugin
|
||||
class PCEnginePlugin : Filesystem
|
||||
{
|
||||
public PCEnginePlugin()
|
||||
{
|
||||
|
||||
@@ -44,9 +44,9 @@ using DiscImageChef;
|
||||
using DiscImageChef.Console;
|
||||
|
||||
|
||||
namespace DiscImageChef.Plugins
|
||||
namespace DiscImageChef.Filesystems
|
||||
{
|
||||
public class ProDOSPlugin : Plugin
|
||||
public class ProDOSPlugin : Filesystem
|
||||
{
|
||||
const byte EmptyStorageType = 0x00;
|
||||
/// <summary>
|
||||
|
||||
@@ -44,9 +44,9 @@ using DiscImageChef;
|
||||
using DiscImageChef.Console;
|
||||
|
||||
|
||||
namespace DiscImageChef.Plugins
|
||||
namespace DiscImageChef.Filesystems
|
||||
{
|
||||
class SolarFS : Plugin
|
||||
class SolarFS : Filesystem
|
||||
{
|
||||
public SolarFS()
|
||||
{
|
||||
|
||||
222
DiscImageChef.Filesystems/Structs.cs
Normal file
222
DiscImageChef.Filesystems/Structs.cs
Normal file
@@ -0,0 +1,222 @@
|
||||
// /***************************************************************************
|
||||
// The Disc Image Chef
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Structs.cs
|
||||
// Version : 1.0
|
||||
// Author(s) : Natalia Portillo
|
||||
//
|
||||
// Component : Component
|
||||
//
|
||||
// Revision : $Revision$
|
||||
// Last change by : $Author$
|
||||
// Date : $Date$
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Description
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program 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 General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright (C) 2011-2015 Claunia.com
|
||||
// ****************************************************************************/
|
||||
// //$Id$
|
||||
using System;
|
||||
namespace DiscImageChef.Filesystems
|
||||
{
|
||||
/// <summary>
|
||||
/// File attributes.
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum FileAttributes
|
||||
{
|
||||
/// <summary>File is an alias (Mac OS)</summary>
|
||||
Alias,
|
||||
/// <summary>Indicates that the file can only be writable appended</summary>
|
||||
AppendOnly,
|
||||
/// <summary>File is candidate for archival/backup</summary>
|
||||
Archive,
|
||||
/// <summary>File is a block device</summary>
|
||||
BlockDevice,
|
||||
/// <summary>File is stored on filesystem block units instead of device sectors</summary>
|
||||
BlockUnits,
|
||||
/// <summary>Directory is a bundle or file contains a BNDL resource</summary>
|
||||
Bundle,
|
||||
/// <summary>File is a char device</summary>
|
||||
CharDevice,
|
||||
/// <summary>File is compressed</summary>
|
||||
Compressed,
|
||||
/// <summary>File is compressed and should not be uncompressed on read</summary>
|
||||
CompressedRaw,
|
||||
/// <summary>File has compression errors</summary>
|
||||
CompressionError,
|
||||
/// <summary>Compressed file is dirty</summary>
|
||||
CompressionDirty,
|
||||
/// <summary>File is a device</summary>
|
||||
Device,
|
||||
/// <summary>File is a directory</summary>
|
||||
Directory,
|
||||
/// <summary>File is encrypted</summary>
|
||||
Encrypted,
|
||||
/// <summary>File is stored on disk using extents</summary>
|
||||
Extents,
|
||||
/// <summary>File is a FIFO</summary>
|
||||
FIFO,
|
||||
/// <summary>File is a normal file</summary>
|
||||
File,
|
||||
/// <summary>File is a Mac OS file containing desktop databases that has already been added to the desktop database</summary>
|
||||
HasBeenInited,
|
||||
/// <summary>File contains an icon resource / EA</summary>
|
||||
HasCustomIcon,
|
||||
/// <summary>File is a Mac OS extension or control panel lacking INIT resources</summary>
|
||||
HasNoINITs,
|
||||
/// <summary>File is hidden/invisible</summary>
|
||||
Hidden,
|
||||
/// <summary>File cannot be written, deleted, modified or linked to</summary>
|
||||
Immutable,
|
||||
/// <summary>Directory is indexed using hashed trees</summary>
|
||||
IndexedDirectory,
|
||||
/// <summary>File contents are stored alongside its inode (or equivalent)</summary>
|
||||
Inline,
|
||||
/// <summary>File contains integrity checks</summary>
|
||||
IntegrityStream,
|
||||
/// <summary>File is on desktop</summary>
|
||||
IsOnDesk,
|
||||
/// <summary>File changes are written to filesystem journal before being written to file itself</summary>
|
||||
Journaled,
|
||||
/// <summary>Access time will not be modified</summary>
|
||||
NoAccessTime,
|
||||
/// <summary>File will not be subject to copy-on-write</summary>
|
||||
NoCopyOnWrite,
|
||||
/// <summary>File will not be backed up</summary>
|
||||
NoDump,
|
||||
/// <summary>File contents should not be scrubed</summary>
|
||||
NoScrub,
|
||||
/// <summary>File contents should not be indexed</summary>
|
||||
NotIndexed,
|
||||
/// <summary>File is offline</summary>
|
||||
Offline,
|
||||
/// <summary>File is password protected, but contents are not encrypted on disk</summary>
|
||||
Password,
|
||||
/// <summary>File is read-only</summary>
|
||||
ReadOnly,
|
||||
/// <summary>File is a reparse point</summary>
|
||||
ReparsePoint,
|
||||
/// <summary>When file is removed its content will be overwritten with zeroes</summary>
|
||||
Secured,
|
||||
/// <summary>File contents are sparse</summary>
|
||||
Sparse,
|
||||
/// <summary>File is a shadow (OS/2)</summary>
|
||||
Shadow,
|
||||
/// <summary>File is shared</summary>
|
||||
Shared,
|
||||
/// <summary>File is a stationery</summary>
|
||||
Stationery,
|
||||
/// <summary>File is a symbolic link</summary>
|
||||
Symlink,
|
||||
/// <summary>File writes are synchronously written to disk</summary>
|
||||
Sync,
|
||||
/// <summary>File belongs to the operating system</summary>
|
||||
System,
|
||||
/// <summary>If file end is a partial block its contend will be merged with other files</summary>
|
||||
TailMerged,
|
||||
/// <summary>File is temporary</summary>
|
||||
Temporary,
|
||||
/// <summary>Subdirectories inside of this directory are not related and should be allocated elsewhere</summary>
|
||||
TopDirectory,
|
||||
/// <summary>If file is deleted, contents should be stored, for a possible future undeletion</summary>
|
||||
Undeletable
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Information about a file entry
|
||||
/// </summary>
|
||||
public struct FileEntryInfo
|
||||
{
|
||||
DateTime crtimeUtc;
|
||||
DateTime atimeUtc;
|
||||
DateTime ctimeUtc;
|
||||
DateTime btimeUtc;
|
||||
DateTime mtimeUtc;
|
||||
|
||||
/// <summary>File attributes</summary>
|
||||
public FileAttributes Attributes;
|
||||
|
||||
/// <summary>File creation date in UTC</summary>
|
||||
public DateTime CreationTimeUtc { get { return crtimeUtc; } set { crtimeUtc = value; } }
|
||||
/// <summary>File last access date in UTC</summary>
|
||||
public DateTime AccessTimeUtc { get { return atimeUtc; } set { atimeUtc = value; } }
|
||||
/// <summary>File attributes change date in UTC</summary>
|
||||
public DateTime StatusChangeTimeUtc { get { return ctimeUtc; } set { ctimeUtc = value; } }
|
||||
/// <summary>File last backup date in UTC</summary>
|
||||
public DateTime BackupTimeUtc { get { return btimeUtc; } set { btimeUtc = value; } }
|
||||
/// <summary>File last modification date in UTC</summary>
|
||||
public DateTime LastWriteTimeUtc { get { return mtimeUtc; } set { mtimeUtc = value; } }
|
||||
|
||||
/// <summary>File creation date</summary>
|
||||
public DateTime CreationTime { get { return crtimeUtc.ToLocalTime(); } set { crtimeUtc = value.ToUniversalTime(); } }
|
||||
/// <summary>File last access date</summary>
|
||||
public DateTime AccessTime { get { return atimeUtc.ToLocalTime(); } set { atimeUtc = value.ToUniversalTime(); } }
|
||||
/// <summary>File attributes change date</summary>
|
||||
public DateTime StatusChangeTime { get { return ctimeUtc.ToLocalTime(); } set { ctimeUtc = value.ToUniversalTime(); } }
|
||||
/// <summary>File last backup date</summary>
|
||||
public DateTime BackupTime { get { return btimeUtc.ToLocalTime(); } set { btimeUtc = value.ToUniversalTime(); } }
|
||||
/// <summary>File last modification date</summary>
|
||||
public DateTime LastWriteTime { get { return mtimeUtc.ToLocalTime(); } set { mtimeUtc = value.ToUniversalTime(); } }
|
||||
|
||||
/// <summary>Path of device that contains this file</summary>
|
||||
public string DevicePath;
|
||||
/// <summary>inode number for this file</summary>
|
||||
public ulong Inode;
|
||||
/// <summary>POSIX permissions/mode for this file</summary>
|
||||
public uint Mode;
|
||||
/// <summary>Number of hard links pointing to this file</summary>
|
||||
public ulong Links;
|
||||
/// <summary>POSIX owner ID</summary>
|
||||
public ulong UID;
|
||||
/// <summary>POSIX group ID</summary>
|
||||
public ulong GID;
|
||||
/// <summary>If file points to a device, device number</summary>
|
||||
public ulong DeviceNo;
|
||||
/// <summary>File length in bytes</summary>
|
||||
public long Length;
|
||||
/// <summary>File block size in bytes</summary>
|
||||
public long BlockSize;
|
||||
/// <summary>File length in blocks</summary>
|
||||
public long Blocks;
|
||||
}
|
||||
|
||||
public struct FileSystemInfo
|
||||
{
|
||||
/// <summary>Filesystem type</summary>
|
||||
public string Type;
|
||||
/// <summary>ID of plugin for this file</summary>
|
||||
public Guid PluginId;
|
||||
/// <summary>Blocks for this filesystem</summary>
|
||||
public long Blocks;
|
||||
/// <summary>Blocks free on this filesystem</summary>
|
||||
public long FreeBlocks;
|
||||
/// <summary>Files on this filesystem</summary>
|
||||
public ulong Files;
|
||||
/// <summary>Free inodes on this filesystem</summary>
|
||||
public ulong FreeFiles;
|
||||
/// <summary>Maximum length of filenames on this filesystem</summary>
|
||||
public ushort FilenameLength;
|
||||
/// <summary>Filesystem ID</summary>
|
||||
public Guid Id;
|
||||
}
|
||||
}
|
||||
@@ -41,9 +41,9 @@ using System.Text;
|
||||
using DiscImageChef;
|
||||
|
||||
// Information from the Linux kernel
|
||||
namespace DiscImageChef.Plugins
|
||||
namespace DiscImageChef.Filesystems
|
||||
{
|
||||
class SysVfs : Plugin
|
||||
class SysVfs : Filesystem
|
||||
{
|
||||
const UInt32 XENIX_MAGIC = 0x002B5544;
|
||||
const UInt32 XENIX_CIGAM = 0x44552B00;
|
||||
|
||||
@@ -44,9 +44,9 @@ using DiscImageChef;
|
||||
using DiscImageChef.Console;
|
||||
|
||||
|
||||
namespace DiscImageChef.Plugins
|
||||
namespace DiscImageChef.Filesystems
|
||||
{
|
||||
class BFS : Plugin
|
||||
class BFS : Filesystem
|
||||
{
|
||||
const UInt32 BFS_MAGIC = 0x1BADFACE;
|
||||
|
||||
|
||||
@@ -41,9 +41,9 @@ using System.Text;
|
||||
using DiscImageChef;
|
||||
|
||||
// Information from the Linux kernel
|
||||
namespace DiscImageChef.Plugins
|
||||
namespace DiscImageChef.Filesystems
|
||||
{
|
||||
class ext2FS : Plugin
|
||||
class ext2FS : Filesystem
|
||||
{
|
||||
public ext2FS()
|
||||
{
|
||||
|
||||
@@ -41,9 +41,9 @@ using System.Text;
|
||||
using DiscImageChef;
|
||||
|
||||
// Information from the Linux kernel
|
||||
namespace DiscImageChef.Plugins
|
||||
namespace DiscImageChef.Filesystems
|
||||
{
|
||||
class extFS : Plugin
|
||||
class extFS : Filesystem
|
||||
{
|
||||
public extFS()
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@ Copyright (C) 2011-2014 Claunia.com
|
||||
//$Id$
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using DiscImageChef.Plugins;
|
||||
using DiscImageChef.Filesystems;
|
||||
using DiscImageChef.ImagePlugins;
|
||||
using DiscImageChef.PartPlugins;
|
||||
using DiscImageChef.Console;
|
||||
@@ -64,7 +64,7 @@ namespace DiscImageChef.Commands
|
||||
plugins.RegisterAllPlugins();
|
||||
|
||||
List<string> id_plugins;
|
||||
Plugin _plugin;
|
||||
Filesystem _plugin;
|
||||
string information;
|
||||
bool checkraw = false;
|
||||
ImagePlugin _imageFormat;
|
||||
@@ -239,7 +239,7 @@ namespace DiscImageChef.Commands
|
||||
PluginBase plugins = new PluginBase();
|
||||
plugins.RegisterAllPlugins();
|
||||
|
||||
foreach(Plugin _plugin in plugins.PluginsList.Values)
|
||||
foreach(Filesystem _plugin in plugins.PluginsList.Values)
|
||||
{
|
||||
if(_plugin.Identify(imagePlugin, partitionStart, partitionEnd))
|
||||
id_plugins.Add(_plugin.Name.ToLower());
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
using System;
|
||||
using Schemas;
|
||||
using System.Collections.Generic;
|
||||
using DiscImageChef.Plugins;
|
||||
using DiscImageChef.Filesystems;
|
||||
using DiscImageChef.ImagePlugins;
|
||||
using DiscImageChef.Console;
|
||||
using DiscImageChef.Checksums;
|
||||
@@ -525,7 +525,7 @@ namespace DiscImageChef.Commands
|
||||
|
||||
List<FileSystemType> lstFs = new List<FileSystemType>();
|
||||
|
||||
foreach(Plugin _plugin in plugins.PluginsList.Values)
|
||||
foreach(Filesystem _plugin in plugins.PluginsList.Values)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -564,7 +564,7 @@ namespace DiscImageChef.Commands
|
||||
|
||||
List<FileSystemType> lstFs = new List<FileSystemType>();
|
||||
|
||||
foreach(Plugin _plugin in plugins.PluginsList.Values)
|
||||
foreach(Filesystem _plugin in plugins.PluginsList.Values)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -730,7 +730,7 @@ namespace DiscImageChef.Commands
|
||||
|
||||
List<FileSystemType> lstFs = new List<FileSystemType>();
|
||||
|
||||
foreach(Plugin _plugin in plugins.PluginsList.Values)
|
||||
foreach(Filesystem _plugin in plugins.PluginsList.Values)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -760,7 +760,7 @@ namespace DiscImageChef.Commands
|
||||
|
||||
List<FileSystemType> lstFs = new List<FileSystemType>();
|
||||
|
||||
foreach(Plugin _plugin in plugins.PluginsList.Values)
|
||||
foreach(Filesystem _plugin in plugins.PluginsList.Values)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -44,7 +44,7 @@ using Schemas;
|
||||
using DiscImageChef.CommonTypes;
|
||||
using DiscImageChef.ImagePlugins;
|
||||
using DiscImageChef.PartPlugins;
|
||||
using DiscImageChef.Plugins;
|
||||
using DiscImageChef.Filesystems;
|
||||
|
||||
namespace DiscImageChef.Commands
|
||||
{
|
||||
@@ -783,7 +783,7 @@ namespace DiscImageChef.Commands
|
||||
|
||||
List<FileSystemType> lstFs = new List<FileSystemType>();
|
||||
|
||||
foreach(Plugin _plugin in plugins.PluginsList.Values)
|
||||
foreach(Filesystem _plugin in plugins.PluginsList.Values)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -814,7 +814,7 @@ namespace DiscImageChef.Commands
|
||||
|
||||
List<FileSystemType> lstFs = new List<FileSystemType>();
|
||||
|
||||
foreach(Plugin _plugin in plugins.PluginsList.Values)
|
||||
foreach(Filesystem _plugin in plugins.PluginsList.Values)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -2976,7 +2976,7 @@ namespace DiscImageChef.Commands
|
||||
|
||||
List<FileSystemType> lstFs = new List<FileSystemType>();
|
||||
|
||||
foreach(Plugin _plugin in plugins.PluginsList.Values)
|
||||
foreach(Filesystem _plugin in plugins.PluginsList.Values)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -3016,7 +3016,7 @@ namespace DiscImageChef.Commands
|
||||
|
||||
List<FileSystemType> lstFs = new List<FileSystemType>();
|
||||
|
||||
foreach(Plugin _plugin in plugins.PluginsList.Values)
|
||||
foreach(Filesystem _plugin in plugins.PluginsList.Values)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using DiscImageChef.ImagePlugins;
|
||||
using DiscImageChef.PartPlugins;
|
||||
using DiscImageChef.Plugins;
|
||||
using DiscImageChef.Filesystems;
|
||||
using DiscImageChef.Console;
|
||||
|
||||
namespace DiscImageChef.Commands
|
||||
@@ -65,7 +65,7 @@ namespace DiscImageChef.Commands
|
||||
DicConsole.WriteLine("Supported filesystems:");
|
||||
if(FormatsOptions.Verbose)
|
||||
DicConsole.VerboseWriteLine("GUID\t\t\t\t\tPlugin");
|
||||
foreach(KeyValuePair<string, Plugin> kvp in plugins.PluginsList)
|
||||
foreach(KeyValuePair<string, Filesystem> kvp in plugins.PluginsList)
|
||||
{
|
||||
if(FormatsOptions.Verbose)
|
||||
DicConsole.VerboseWriteLine("{0}\t{1}", kvp.Value.PluginUUID, kvp.Value.Name);
|
||||
|
||||
@@ -41,20 +41,20 @@ using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using DiscImageChef.ImagePlugins;
|
||||
using DiscImageChef.PartPlugins;
|
||||
using DiscImageChef.Plugins;
|
||||
using DiscImageChef.Filesystems;
|
||||
using DiscImageChef.Console;
|
||||
|
||||
namespace DiscImageChef
|
||||
{
|
||||
public class PluginBase
|
||||
{
|
||||
public Dictionary<string, Plugin> PluginsList;
|
||||
public Dictionary<string, Filesystem> PluginsList;
|
||||
public Dictionary<string, PartPlugin> PartPluginsList;
|
||||
public Dictionary<string, ImagePlugin> ImagePluginsList;
|
||||
|
||||
public PluginBase()
|
||||
{
|
||||
PluginsList = new Dictionary<string, Plugin>();
|
||||
PluginsList = new Dictionary<string, Filesystem>();
|
||||
PartPluginsList = new Dictionary<string, PartPlugin>();
|
||||
ImagePluginsList = new Dictionary<string, ImagePlugin>();
|
||||
}
|
||||
@@ -99,15 +99,15 @@ namespace DiscImageChef
|
||||
}
|
||||
}
|
||||
|
||||
assembly = Assembly.GetAssembly(typeof(Plugin));
|
||||
assembly = Assembly.GetAssembly(typeof(Filesystem));
|
||||
|
||||
foreach (Type type in assembly.GetTypes())
|
||||
{
|
||||
try
|
||||
{
|
||||
if (type.IsSubclassOf(typeof(Plugin)))
|
||||
if (type.IsSubclassOf(typeof(Filesystem)))
|
||||
{
|
||||
Plugin plugin = (Plugin)type.GetConstructor(Type.EmptyTypes).Invoke(new object[] { });
|
||||
Filesystem plugin = (Filesystem)type.GetConstructor(Type.EmptyTypes).Invoke(new object[] { });
|
||||
RegisterPlugin(plugin);
|
||||
}
|
||||
}
|
||||
@@ -126,7 +126,7 @@ namespace DiscImageChef
|
||||
}
|
||||
}
|
||||
|
||||
void RegisterPlugin(Plugin plugin)
|
||||
void RegisterPlugin(Filesystem plugin)
|
||||
{
|
||||
if (!PluginsList.ContainsKey(plugin.Name.ToLower()))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user