diff --git a/.idea/.idea.DiscImageChef/.idea/contentModel.xml b/.idea/.idea.DiscImageChef/.idea/contentModel.xml
index 76a66ebb..ddb16a0c 100644
--- a/.idea/.idea.DiscImageChef/.idea/contentModel.xml
+++ b/.idea/.idea.DiscImageChef/.idea/contentModel.xml
@@ -32,6 +32,7 @@
+
diff --git a/DiscImageChef.Filesystems/AppleDOS/AppleDOS.cs b/DiscImageChef.Filesystems/AppleDOS/AppleDOS.cs
index 941930fa..f0d9ff7c 100644
--- a/DiscImageChef.Filesystems/AppleDOS/AppleDOS.cs
+++ b/DiscImageChef.Filesystems/AppleDOS/AppleDOS.cs
@@ -57,6 +57,11 @@ namespace DiscImageChef.Filesystems.AppleDOS
public string Name => "Apple DOS File System";
public Guid Id => new Guid("8658A1E9-B2E7-4BCC-9638-157A31B0A700\n");
+ public (string name, Type type, string description)[] ListOptions()
+ {
+ return new(string name, Type type, string description)[] { };
+ }
+
static Dictionary GetDefaultOptions()
{
return new Dictionary {{"debug", false.ToString()}};
@@ -70,17 +75,17 @@ namespace DiscImageChef.Filesystems.AppleDOS
/// Caches catalog
Dictionary catalogCache;
/// Caches file size
- Dictionary fileSizeCache;
+ Dictionary fileSizeCache;
/// Caches VTOC
- byte[] vtocBlocks;
+ byte[] vtocBlocks;
/// Caches catalog
- byte[] catalogBlocks;
+ byte[] catalogBlocks;
/// Caches boot code
- byte[] bootBlocks;
+ byte[] bootBlocks;
/// Caches file type
- Dictionary fileTypeCache;
+ Dictionary fileTypeCache;
/// Caches locked files
- List lockedFiles;
+ List lockedFiles;
#endregion Caches
}
}
\ No newline at end of file
diff --git a/DiscImageChef.Filesystems/AppleMFS/AppleMFS.cs b/DiscImageChef.Filesystems/AppleMFS/AppleMFS.cs
index c92d73dd..5da78b40 100644
--- a/DiscImageChef.Filesystems/AppleMFS/AppleMFS.cs
+++ b/DiscImageChef.Filesystems/AppleMFS/AppleMFS.cs
@@ -71,5 +71,11 @@ namespace DiscImageChef.Filesystems.AppleMFS
{
return new Dictionary {{"debug", false.ToString()}};
}
+
+ // TODO: Implement Finder namespace (requires decoding Desktop database)
+ public (string name, Type type, string description)[] ListOptions()
+ {
+ return new(string name, Type type, string description)[] { };
+ }
}
}
\ No newline at end of file
diff --git a/DiscImageChef.Filesystems/CPM/CPM.cs b/DiscImageChef.Filesystems/CPM/CPM.cs
index 89919375..3b1c315f 100644
--- a/DiscImageChef.Filesystems/CPM/CPM.cs
+++ b/DiscImageChef.Filesystems/CPM/CPM.cs
@@ -117,6 +117,11 @@ namespace DiscImageChef.Filesystems.CPM
public string Name => "CP/M File System";
public Guid Id => new Guid("AA2B8585-41DF-4E3B-8A35-D1A935E2F8A1");
+ public (string name, Type type, string description)[] ListOptions()
+ {
+ return new(string name, Type type, string description)[] { };
+ }
+
static Dictionary GetDefaultOptions()
{
return new Dictionary {{"debug", false.ToString()}};
diff --git a/DiscImageChef.Filesystems/DiscImageChef.Filesystems.csproj b/DiscImageChef.Filesystems/DiscImageChef.Filesystems.csproj
index 7a1453d7..0ccd04d6 100644
--- a/DiscImageChef.Filesystems/DiscImageChef.Filesystems.csproj
+++ b/DiscImageChef.Filesystems/DiscImageChef.Filesystems.csproj
@@ -35,6 +35,9 @@
..\packages\Claunia.Encoding.1.4.0\lib\portable40-net40+sl5+win8+wp8\Claunia.Encoding.dll
+
+ ..\packages\System.ValueTuple.4.4.0\lib\portable-net40+sl4+win8+wp8\System.ValueTuple.dll
+
diff --git a/DiscImageChef.Filesystems/IReadOnlyFilesystem.cs b/DiscImageChef.Filesystems/IReadOnlyFilesystem.cs
index 4b261b4d..ae8fa544 100644
--- a/DiscImageChef.Filesystems/IReadOnlyFilesystem.cs
+++ b/DiscImageChef.Filesystems/IReadOnlyFilesystem.cs
@@ -31,6 +31,7 @@
// Copyright © 2011-2018 Natalia Portillo
// ****************************************************************************/
+using System;
using System.Collections.Generic;
using System.Text;
using DiscImageChef.CommonTypes;
@@ -129,5 +130,10 @@ namespace DiscImageChef.Filesystems
/// Link path.
/// Link destination.
Errno ReadLink(string path, out string dest);
+
+ ///
+ /// Retrieves a list of options supported by the filesystem, with name, type and description
+ ///
+ (string name, Type type, string description)[] ListOptions();
}
}
\ No newline at end of file
diff --git a/DiscImageChef.Filesystems/LisaFS/LisaFS.cs b/DiscImageChef.Filesystems/LisaFS/LisaFS.cs
index fe601476..451ba189 100644
--- a/DiscImageChef.Filesystems/LisaFS/LisaFS.cs
+++ b/DiscImageChef.Filesystems/LisaFS/LisaFS.cs
@@ -56,6 +56,12 @@ namespace DiscImageChef.Filesystems.LisaFS
public Encoding Encoding { get; private set; }
public FileSystemType XmlFsType { get; private set; }
+ // TODO: Implement Lisa 7/7 namespace (needs decoding {!CATALOG} file)
+ public (string name, Type type, string description)[] ListOptions()
+ {
+ return new(string name, Type type, string description)[] { };
+ }
+
static Dictionary GetDefaultOptions()
{
return new Dictionary {{"debug", false.ToString()}};
@@ -65,17 +71,17 @@ namespace DiscImageChef.Filesystems.LisaFS
/// Caches Extents Files
Dictionary extentCache;
/// Caches system files
- Dictionary systemFileCache;
+ Dictionary systemFileCache;
/// Caches user files files
- Dictionary fileCache;
+ Dictionary fileCache;
/// Caches catalogs
- List catalogCache;
+ List catalogCache;
/// Caches file size
- Dictionary fileSizeCache;
+ Dictionary fileSizeCache;
/// Lists Extents Files already printed in debug mode to not repeat them
- List printedExtents;
+ List printedExtents;
/// Caches the creation times for subdirectories as to not have to traverse the Catalog File on each stat
- Dictionary directoryDtcCache;
+ Dictionary directoryDtcCache;
#endregion Caches
}
}
\ No newline at end of file
diff --git a/DiscImageChef.Filesystems/UCSDPascal/UCSDPascal.cs b/DiscImageChef.Filesystems/UCSDPascal/UCSDPascal.cs
index 24cdab8f..32bdbfce 100644
--- a/DiscImageChef.Filesystems/UCSDPascal/UCSDPascal.cs
+++ b/DiscImageChef.Filesystems/UCSDPascal/UCSDPascal.cs
@@ -73,6 +73,11 @@ namespace DiscImageChef.Filesystems.UCSDPascal
return Errno.NotSupported;
}
+ public (string name, Type type, string description)[] ListOptions()
+ {
+ return new(string name, Type type, string description)[] { };
+ }
+
static Dictionary GetDefaultOptions()
{
return new Dictionary {{"debug", false.ToString()}};
diff --git a/DiscImageChef.Filesystems/packages.config b/DiscImageChef.Filesystems/packages.config
index f3e60871..13131e88 100644
--- a/DiscImageChef.Filesystems/packages.config
+++ b/DiscImageChef.Filesystems/packages.config
@@ -1,4 +1,5 @@
+
\ No newline at end of file
diff --git a/DiscImageChef/Commands/ListOptions.cs b/DiscImageChef/Commands/ListOptions.cs
new file mode 100644
index 00000000..3a350861
--- /dev/null
+++ b/DiscImageChef/Commands/ListOptions.cs
@@ -0,0 +1,61 @@
+// /***************************************************************************
+// The Disc Image Chef
+// ----------------------------------------------------------------------------
+//
+// Filename : ListOptions.cs
+// Author(s) : Natalia Portillo
+//
+// Component : Verbs.
+//
+// --[ Description ] ----------------------------------------------------------
+//
+// Lists all options supported by read-only filesystems.
+//
+// --[ 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 .
+//
+// ----------------------------------------------------------------------------
+// Copyright © 2011-2018 Natalia Portillo
+// ****************************************************************************/
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using DiscImageChef.Console;
+using DiscImageChef.Core;
+using DiscImageChef.Filesystems;
+
+namespace DiscImageChef.Commands
+{
+ static class ListOptions
+ {
+ internal static void DoList()
+ {
+ PluginBase plugins = new PluginBase();
+
+ foreach(KeyValuePair kvp in plugins.ReadOnlyFilesystems)
+ {
+ List<(string name, Type type, string description)> options = kvp.Value.ListOptions().ToList();
+ options.Add(("debug", typeof(bool), "Enables debug features if available"));
+
+ DicConsole.WriteLine("Options for {0}:", kvp.Value.Name);
+ DicConsole.WriteLine("{0,-16} {1,-16} {2,-8}", "Name", "Type", "Description");
+ foreach((string name, Type type, string description) option in options.OrderBy(t => t.name))
+ DicConsole.WriteLine("{0,-16} {1,-16} {2,-8}", option.name, option.type, option.description);
+ DicConsole.WriteLine();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/DiscImageChef/DiscImageChef.csproj b/DiscImageChef/DiscImageChef.csproj
index 98d6e5f4..2fc37bc3 100644
--- a/DiscImageChef/DiscImageChef.csproj
+++ b/DiscImageChef/DiscImageChef.csproj
@@ -45,9 +45,13 @@
..\packages\CommandLineParser.2.1.1-beta\lib\net40\CommandLine.dll
+
+ ..\packages\System.ValueTuple.4.4.0\lib\portable-net40+sl4+win8+wp8\System.ValueTuple.dll
+
+
diff --git a/DiscImageChef/Main.cs b/DiscImageChef/Main.cs
index 9f6fbdad..68d012b7 100644
--- a/DiscImageChef/Main.cs
+++ b/DiscImageChef/Main.cs
@@ -43,8 +43,8 @@ namespace DiscImageChef
{
public static void Main(string[] args)
{
- DicConsole.WriteLineEvent += System.Console.WriteLine;
- DicConsole.WriteEvent += System.Console.Write;
+ DicConsole.WriteLineEvent += System.Console.WriteLine;
+ DicConsole.WriteEvent += System.Console.Write;
DicConsole.ErrorWriteLineEvent += System.Console.Error.WriteLine;
Settings.Settings.LoadSettings();
@@ -58,143 +58,152 @@ namespace DiscImageChef
typeof(CreateSidecarOptions), typeof(DumpMediaOptions),
typeof(DeviceReportOptions), typeof(ConfigureOptions), typeof(StatsOptions),
typeof(LsOptions), typeof(ExtractFilesOptions), typeof(ListDevicesOptions),
- typeof(ListEncodingsOptions)).WithParsed(opts =>
- {
- if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
- if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
- PrintCopyright();
- Analyze.DoAnalyze(opts);
- }).WithParsed(opts =>
- {
- if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
- if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
- PrintCopyright();
- Compare.DoCompare(opts);
- }).WithParsed(opts =>
- {
- if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
- if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
- PrintCopyright();
- Checksum.DoChecksum(opts);
- }).WithParsed(opts =>
- {
- if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
- if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
- PrintCopyright();
- Entropy.DoEntropy(opts);
- }).WithParsed(opts =>
- {
- if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
- if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
- PrintCopyright();
- Verify.DoVerify(opts);
- }).WithParsed(opts =>
- {
- if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
- if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
- PrintCopyright();
- Commands.PrintHex.DoPrintHex(opts);
- }).WithParsed(opts =>
- {
- if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
- if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
- PrintCopyright();
- Decode.DoDecode(opts);
- }).WithParsed(opts =>
- {
- if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
- if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
- PrintCopyright();
- DeviceInfo.DoDeviceInfo(opts);
- }).WithParsed(opts =>
- {
- if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
- if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
- PrintCopyright();
- MediaInfo.DoMediaInfo(opts);
- }).WithParsed(opts =>
- {
- if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
- if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
- PrintCopyright();
- MediaScan.DoMediaScan(opts);
- }).WithParsed(opts =>
- {
- if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
- if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
- PrintCopyright();
- Formats.ListFormats(opts);
- }).WithParsed(opts =>
- {
- if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
- if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
- PrintCopyright();
- Benchmark.DoBenchmark(opts);
- }).WithParsed(opts =>
- {
- if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
- if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
- PrintCopyright();
- CreateSidecar.DoSidecar(opts);
- }).WithParsed(opts =>
- {
- if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
- if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
- PrintCopyright();
- DumpMedia.DoDumpMedia(opts);
- }).WithParsed(opts =>
- {
- if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
- if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
- PrintCopyright();
- DeviceReport.DoDeviceReport(opts);
- }).WithParsed(opts =>
- {
- if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
- if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
- PrintCopyright();
- Ls.DoLs(opts);
- }).WithParsed(opts =>
- {
- if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
- if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
- PrintCopyright();
- ExtractFiles.DoExtractFiles(opts);
- }).WithParsed(opts =>
- {
- if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
- if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
- PrintCopyright();
- ListDevices.DoListDevices(opts);
- }).WithParsed(opts =>
- {
- if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
- if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
- PrintCopyright();
- ListEncodings.DoList();
- }).WithParsed(opts =>
- {
- PrintCopyright();
- Configure.DoConfigure();
- }).WithParsed(opts =>
- {
- PrintCopyright();
- Commands.Statistics.ShowStats();
- }).WithNotParsed(errs => Environment.Exit(1));
+ typeof(ListEncodingsOptions), typeof(ListOptionsOptions))
+ .WithParsed(opts =>
+ {
+ if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
+ if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
+ PrintCopyright();
+ Analyze.DoAnalyze(opts);
+ }).WithParsed(opts =>
+ {
+ if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
+ if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
+ PrintCopyright();
+ Compare.DoCompare(opts);
+ }).WithParsed(opts =>
+ {
+ if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
+ if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
+ PrintCopyright();
+ Checksum.DoChecksum(opts);
+ }).WithParsed(opts =>
+ {
+ if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
+ if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
+ PrintCopyright();
+ Entropy.DoEntropy(opts);
+ }).WithParsed(opts =>
+ {
+ if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
+ if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
+ PrintCopyright();
+ Verify.DoVerify(opts);
+ }).WithParsed(opts =>
+ {
+ if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
+ if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
+ PrintCopyright();
+ Commands.PrintHex.DoPrintHex(opts);
+ }).WithParsed(opts =>
+ {
+ if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
+ if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
+ PrintCopyright();
+ Decode.DoDecode(opts);
+ }).WithParsed(opts =>
+ {
+ if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
+ if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
+ PrintCopyright();
+ DeviceInfo.DoDeviceInfo(opts);
+ }).WithParsed(opts =>
+ {
+ if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
+ if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
+ PrintCopyright();
+ MediaInfo.DoMediaInfo(opts);
+ }).WithParsed(opts =>
+ {
+ if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
+ if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
+ PrintCopyright();
+ MediaScan.DoMediaScan(opts);
+ }).WithParsed(opts =>
+ {
+ if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
+ if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
+ PrintCopyright();
+ Formats.ListFormats(opts);
+ }).WithParsed(opts =>
+ {
+ if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
+ if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
+ PrintCopyright();
+ Benchmark.DoBenchmark(opts);
+ }).WithParsed(opts =>
+ {
+ if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
+ if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
+ PrintCopyright();
+ CreateSidecar.DoSidecar(opts);
+ }).WithParsed(opts =>
+ {
+ if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
+ if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
+ PrintCopyright();
+ DumpMedia.DoDumpMedia(opts);
+ }).WithParsed(opts =>
+ {
+ if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
+ if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
+ PrintCopyright();
+ DeviceReport.DoDeviceReport(opts);
+ }).WithParsed(opts =>
+ {
+ if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
+ if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
+ PrintCopyright();
+ Ls.DoLs(opts);
+ }).WithParsed(opts =>
+ {
+ if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
+ if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
+ PrintCopyright();
+ ExtractFiles.DoExtractFiles(opts);
+ }).WithParsed(opts =>
+ {
+ if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
+ if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
+ PrintCopyright();
+ ListDevices.DoListDevices(opts);
+ }).WithParsed(opts =>
+ {
+ if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
+ if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
+ PrintCopyright();
+ ListEncodings.DoList();
+ }).WithParsed(opts =>
+ {
+ if(opts.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
+ if(opts.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
+ PrintCopyright();
+ ListOptions.DoList();
+ }).WithParsed(opts =>
+ {
+ PrintCopyright();
+ Configure.DoConfigure();
+ }).WithParsed(opts =>
+ {
+ PrintCopyright();
+ Commands.Statistics.ShowStats();
+ }).WithNotParsed(errs => Environment.Exit(1));
Statistics.SaveStats();
}
static void PrintCopyright()
{
- object[] attributes = typeof(MainClass).Assembly.GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
+ object[] attributes =
+ typeof(MainClass).Assembly.GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
string assemblyTitle = ((AssemblyTitleAttribute)attributes[0]).Title;
- attributes = typeof(MainClass).Assembly.GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
- Version assemblyVersion = typeof(MainClass).Assembly.GetName().Version;
- string assemblyCopyright = ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
+ attributes =
+ typeof(MainClass).Assembly.GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
+ Version assemblyVersion = typeof(MainClass).Assembly.GetName().Version;
+ string assemblyCopyright = ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
DicConsole.WriteLine("{0} {1}", assemblyTitle, assemblyVersion);
- DicConsole.WriteLine("{0}", assemblyCopyright);
+ DicConsole.WriteLine("{0}", assemblyCopyright);
DicConsole.WriteLine();
}
}
diff --git a/DiscImageChef/Options.cs b/DiscImageChef/Options.cs
index 0daba47f..e56f24f5 100644
--- a/DiscImageChef/Options.cs
+++ b/DiscImageChef/Options.cs
@@ -130,7 +130,8 @@ namespace DiscImageChef
public class EntropyOptions : CommonOptions
{
[Option('p', "duplicated-sectors", Default = true,
- HelpText = "Calculates how many sectors are duplicated (have same exact data in user area).")]
+ HelpText =
+ "Calculates how many sectors are duplicated (have same exact data in user area).")]
public bool DuplicatedSectors { get; set; }
[Option('t', "separated-tracks", Default = true, HelpText = "Calculates entropy for each track separately.")]
@@ -201,7 +202,7 @@ namespace DiscImageChef
public string DevicePath { get; set; }
[Option('w', "output-prefix", Required = false, Default = "",
- HelpText = "Write binary responses from device with that prefix.")]
+ HelpText = "Write binary responses from device with that prefix.")]
public string OutputPrefix { get; set; }
}
@@ -212,7 +213,7 @@ namespace DiscImageChef
public string DevicePath { get; set; }
[Option('w', "output-prefix", Required = false, Default = "",
- HelpText = "Write binary responses from device with that prefix.")]
+ HelpText = "Write binary responses from device with that prefix.")]
public string OutputPrefix { get; set; }
}
@@ -223,11 +224,11 @@ namespace DiscImageChef
public string DevicePath { get; set; }
[Option('m', "mhdd-log", Required = false, Default = "",
- HelpText = "Write a log of the scan in the format used by MHDD.")]
+ HelpText = "Write a log of the scan in the format used by MHDD.")]
public string MhddLogPath { get; set; }
[Option('b', "ibg-log", Required = false, Default = "",
- HelpText = "Write a log of the scan in the format used by ImgBurn.")]
+ HelpText = "Write a log of the scan in the format used by ImgBurn.")]
public string IbgLogPath { get; set; }
}
@@ -250,11 +251,11 @@ namespace DiscImageChef
[Option('i', "input", Required = true, HelpText = "Disc image.")]
public string InputFile { get; set; }
[Option('t', "tape", Required = false, Default = false,
- HelpText =
+ HelpText =
"When used indicates that input is a folder containing alphabetically sorted files extracted from a linear block-based tape with fixed block size (e.g. a SCSI tape device).")]
public bool Tape { get; set; }
[Option('b', "block-size", Required = false, Default = 512,
- HelpText =
+ HelpText =
"Only used for tapes, indicates block size. Files in the folder whose size is not a multiple of this value will simply be ignored.")]
public int BlockSize { get; set; }
@@ -272,7 +273,7 @@ namespace DiscImageChef
public string OutputPrefix { get; set; }
[Option('r', "raw", Default = false,
- HelpText = "Dump sectors with tags included. For optical media, dump scrambled sectors")]
+ HelpText = "Dump sectors with tags included. For optical media, dump scrambled sectors")]
public bool Raw { get; set; }
[Option('s', "stop-on-error", Default = false, HelpText = "Stop media dump on first error.")]
@@ -288,7 +289,7 @@ namespace DiscImageChef
public bool Persistent { get; set; }
[Option("separate-subchannel", Default = false,
- HelpText = "Save subchannel in a separate file. Only applicable to CD/DDCD/GD.")]
+ HelpText = "Save subchannel in a separate file. Only applicable to CD/DDCD/GD.")]
public bool SeparateSubchannel { get; set; }
[Option('m', "resume", Default = true, HelpText = "Create/use resume mapfile.")]
@@ -334,7 +335,7 @@ namespace DiscImageChef
public string InputFile { get; set; }
[Option('o', "output", Required = true,
- HelpText = "Directory where extracted files will be created. Will abort if it exists.")]
+ HelpText = "Directory where extracted files will be created. Will abort if it exists.")]
public string OutputDir { get; set; }
[Option('x', "xattrs", Default = false, HelpText = "Extract extended attributes if present.")]
@@ -349,4 +350,7 @@ namespace DiscImageChef
[Verb("list-encodings", HelpText = "Lists all supported text encodings and code pages.")]
public class ListEncodingsOptions : CommonOptions { }
+
+ [Verb("list-options", HelpText = "Lists all options supported by read-only filesystems.")]
+ public class ListOptionsOptions : CommonOptions { }
}
\ No newline at end of file
diff --git a/DiscImageChef/packages.config b/DiscImageChef/packages.config
index 656f5e8d..67064e6b 100644
--- a/DiscImageChef/packages.config
+++ b/DiscImageChef/packages.config
@@ -3,4 +3,5 @@
+
\ No newline at end of file