diff --git a/.idea/.idea.DiscImageChef/.idea/codeStyles/codeStyleConfig.xml b/.idea/.idea.DiscImageChef/.idea/codeStyles/codeStyleConfig.xml
new file mode 100644
index 000000000..a55e7a179
--- /dev/null
+++ b/.idea/.idea.DiscImageChef/.idea/codeStyles/codeStyleConfig.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.DiscImageChef/.idea/contentModel.xml b/.idea/.idea.DiscImageChef/.idea/contentModel.xml
index 7b3d6999a..76a66ebb4 100644
--- a/.idea/.idea.DiscImageChef/.idea/contentModel.xml
+++ b/.idea/.idea.DiscImageChef/.idea/contentModel.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/DiscImageChef/Commands/ExtractFiles.cs b/DiscImageChef/Commands/ExtractFiles.cs
index 6a3f444d8..8c58241b6 100644
--- a/DiscImageChef/Commands/ExtractFiles.cs
+++ b/DiscImageChef/Commands/ExtractFiles.cs
@@ -48,14 +48,16 @@ namespace DiscImageChef.Commands
{
internal static void DoExtractFiles(ExtractFilesOptions options)
{
- DicConsole.DebugWriteLine("Extract-Files command", "--debug={0}", options.Debug);
+ DicConsole.DebugWriteLine("Extract-Files command", "--debug={0}", options.Debug);
DicConsole.DebugWriteLine("Extract-Files command", "--verbose={0}", options.Verbose);
- DicConsole.DebugWriteLine("Extract-Files command", "--input={0}", options.InputFile);
- DicConsole.DebugWriteLine("Extract-Files command", "--xattrs={0}", options.Xattrs);
- DicConsole.DebugWriteLine("Extract-Files command", "--output={0}", options.OutputDir);
+ DicConsole.DebugWriteLine("Extract-Files command", "--input={0}", options.InputFile);
+ DicConsole.DebugWriteLine("Extract-Files command", "--xattrs={0}", options.Xattrs);
+ DicConsole.DebugWriteLine("Extract-Files command", "--output={0}", options.OutputDir);
- FiltersList filtersList = new FiltersList();
- IFilter inputFilter = filtersList.GetFilter(options.InputFile);
+ FiltersList filtersList = new FiltersList();
+ IFilter inputFilter = filtersList.GetFilter(options.InputFile);
+ Dictionary optionsDict =
+ new Dictionary {{"debug", options.Debug.ToString()}};
if(inputFilter == null)
{
@@ -133,9 +135,9 @@ namespace DiscImageChef.Commands
List partitions = Core.Partitions.GetAll(imageFormat);
Core.Partitions.AddSchemesToStats(partitions);
- List idPlugins;
+ List idPlugins;
IReadOnlyFilesystem plugin;
- Errno error;
+ Errno error;
if(partitions.Count == 0) DicConsole.DebugWriteLine("Extract-Files command", "No partitions found");
else
{
@@ -149,7 +151,7 @@ namespace DiscImageChef.Commands
DicConsole.WriteLine("Identifying filesystem on partition");
Core.Filesystems.Identify(imageFormat, out idPlugins, partitions[i]);
- if(idPlugins.Count == 0) DicConsole.WriteLine("Filesystem not identified");
+ if(idPlugins.Count == 0) DicConsole.WriteLine("Filesystem not identified");
else if(idPlugins.Count > 1)
{
DicConsole.WriteLine($"Identified by {idPlugins.Count} plugins");
@@ -159,13 +161,15 @@ namespace DiscImageChef.Commands
{
DicConsole.WriteLine($"As identified by {plugin.Name}.");
IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin
- .GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { });
+ .GetType()
+ .GetConstructor(Type.EmptyTypes)
+ ?.Invoke(new object[] { });
- error = fs.Mount(imageFormat, partitions[i], encoding, options.Debug);
+ error = fs.Mount(imageFormat, partitions[i], encoding, optionsDict);
if(error == Errno.NoError)
{
List rootDir = new List();
- error = fs.ReadDir("/", out rootDir);
+ error = fs.ReadDir("/", out rootDir);
if(error == Errno.NoError)
foreach(string entry in rootDir)
{
@@ -179,7 +183,7 @@ namespace DiscImageChef.Commands
error = fs.Stat(entry, out stat);
if(error == Errno.NoError)
{
- string outputPath;
+ string outputPath;
FileStream outputFile;
if(options.Xattrs)
{
@@ -190,14 +194,15 @@ namespace DiscImageChef.Commands
foreach(string xattr in xattrs)
{
byte[] xattrBuf = new byte[0];
- error = fs.GetXattr(entry, xattr, ref xattrBuf);
+ error =
+ fs.GetXattr(entry, xattr, ref xattrBuf);
if(error != Errno.NoError) continue;
Directory
- .CreateDirectory(Path.Combine(options.OutputDir,
- fs.XmlFsType.Type,
- volumeName, ".xattrs",
- xattr));
+ .CreateDirectory(Path.Combine(options.OutputDir,
+ fs.XmlFsType.Type,
+ volumeName, ".xattrs",
+ xattr));
outputPath =
Path.Combine(options.OutputDir, fs.XmlFsType.Type,
@@ -212,32 +217,34 @@ namespace DiscImageChef.Commands
outputFile.Write(xattrBuf, 0, xattrBuf.Length);
outputFile.Close();
FileInfo fi = new FileInfo(outputPath);
-#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
+ #pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
try { fi.CreationTimeUtc = stat.CreationTimeUtc; }
catch
{
// ignored
}
+
try { fi.LastWriteTimeUtc = stat.LastWriteTimeUtc; }
catch
{
// ignored
}
+
try { fi.LastAccessTimeUtc = stat.AccessTimeUtc; }
catch
{
// ignored
}
-#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
+ #pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
DicConsole
- .WriteLine("Written {0} bytes of xattr {1} from file {2} to {3}",
- xattrBuf.Length, xattr, entry,
- outputPath);
+ .WriteLine("Written {0} bytes of xattr {1} from file {2} to {3}",
+ xattrBuf.Length, xattr, entry,
+ outputPath);
}
else
DicConsole
- .ErrorWriteLine("Cannot write xattr {0} for {1}, output exists",
- xattr, entry);
+ .ErrorWriteLine("Cannot write xattr {0} for {1}, output exists",
+ xattr, entry);
}
}
@@ -263,23 +270,25 @@ namespace DiscImageChef.Commands
outputFile.Write(outBuf, 0, outBuf.Length);
outputFile.Close();
FileInfo fi = new FileInfo(outputPath);
-#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
+ #pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
try { fi.CreationTimeUtc = stat.CreationTimeUtc; }
catch
{
// ignored
}
+
try { fi.LastWriteTimeUtc = stat.LastWriteTimeUtc; }
catch
{
// ignored
}
+
try { fi.LastAccessTimeUtc = stat.AccessTimeUtc; }
catch
{
// ignored
}
-#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
+ #pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
DicConsole.WriteLine("Written {0} bytes of file {1} to {2}",
outBuf.Length, entry, outputPath);
}
@@ -289,8 +298,8 @@ namespace DiscImageChef.Commands
}
else
DicConsole
- .ErrorWriteLine("Cannot write file {0}, output exists",
- entry);
+ .ErrorWriteLine("Cannot write file {0}, output exists",
+ entry);
}
else DicConsole.ErrorWriteLine("Error reading file {0}", entry);
}
@@ -310,12 +319,13 @@ namespace DiscImageChef.Commands
plugins.ReadOnlyFilesystems.TryGetValue(idPlugins[0], out plugin);
DicConsole.WriteLine($"Identified by {plugin.Name}.");
IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin
- .GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { });
- error = fs.Mount(imageFormat, partitions[i], encoding, options.Debug);
+ .GetType().GetConstructor(Type.EmptyTypes)
+ ?.Invoke(new object[] { });
+ error = fs.Mount(imageFormat, partitions[i], encoding, optionsDict);
if(error == Errno.NoError)
{
List rootDir = new List();
- error = fs.ReadDir("/", out rootDir);
+ error = fs.ReadDir("/", out rootDir);
if(error == Errno.NoError)
foreach(string entry in rootDir)
{
@@ -330,7 +340,7 @@ namespace DiscImageChef.Commands
if(error == Errno.NoError)
{
FileStream outputFile;
- string outputPath;
+ string outputPath;
if(options.Xattrs)
{
List xattrs = new List();
@@ -340,7 +350,7 @@ namespace DiscImageChef.Commands
foreach(string xattr in xattrs)
{
byte[] xattrBuf = new byte[0];
- error = fs.GetXattr(entry, xattr, ref xattrBuf);
+ error = fs.GetXattr(entry, xattr, ref xattrBuf);
if(error != Errno.NoError) continue;
Directory.CreateDirectory(Path.Combine(options.OutputDir,
@@ -360,31 +370,33 @@ namespace DiscImageChef.Commands
outputFile.Write(xattrBuf, 0, xattrBuf.Length);
outputFile.Close();
FileInfo fi = new FileInfo(outputPath);
-#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
+ #pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
try { fi.CreationTimeUtc = stat.CreationTimeUtc; }
catch
{
// ignored
}
+
try { fi.LastWriteTimeUtc = stat.LastWriteTimeUtc; }
catch
{
// ignored
}
+
try { fi.LastAccessTimeUtc = stat.AccessTimeUtc; }
catch
{
// ignored
}
-#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
+ #pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
DicConsole
- .WriteLine("Written {0} bytes of xattr {1} from file {2} to {3}",
- xattrBuf.Length, xattr, entry, outputPath);
+ .WriteLine("Written {0} bytes of xattr {1} from file {2} to {3}",
+ xattrBuf.Length, xattr, entry, outputPath);
}
else
DicConsole
- .ErrorWriteLine("Cannot write xattr {0} for {1}, output exists",
- xattr, entry);
+ .ErrorWriteLine("Cannot write xattr {0} for {1}, output exists",
+ xattr, entry);
}
}
@@ -408,23 +420,25 @@ namespace DiscImageChef.Commands
outputFile.Write(outBuf, 0, outBuf.Length);
outputFile.Close();
FileInfo fi = new FileInfo(outputPath);
-#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
+ #pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
try { fi.CreationTimeUtc = stat.CreationTimeUtc; }
catch
{
// ignored
}
+
try { fi.LastWriteTimeUtc = stat.LastWriteTimeUtc; }
catch
{
// ignored
}
+
try { fi.LastAccessTimeUtc = stat.AccessTimeUtc; }
catch
{
// ignored
}
-#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
+ #pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
DicConsole.WriteLine("Written {0} bytes of file {1} to {2}",
outBuf.Length, entry, outputPath);
}
@@ -450,13 +464,13 @@ namespace DiscImageChef.Commands
Partition wholePart = new Partition
{
- Name = "Whole device",
+ Name = "Whole device",
Length = imageFormat.Info.Sectors,
- Size = imageFormat.Info.Sectors * imageFormat.Info.SectorSize
+ Size = imageFormat.Info.Sectors * imageFormat.Info.SectorSize
};
Core.Filesystems.Identify(imageFormat, out idPlugins, wholePart);
- if(idPlugins.Count == 0) DicConsole.WriteLine("Filesystem not identified");
+ if(idPlugins.Count == 0) DicConsole.WriteLine("Filesystem not identified");
else if(idPlugins.Count > 1)
{
DicConsole.WriteLine($"Identified by {idPlugins.Count} plugins");
@@ -466,12 +480,13 @@ namespace DiscImageChef.Commands
{
DicConsole.WriteLine($"As identified by {plugin.Name}.");
IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin
- .GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { });
- error = fs.Mount(imageFormat, wholePart, encoding, options.Debug);
+ .GetType().GetConstructor(Type.EmptyTypes)
+ ?.Invoke(new object[] { });
+ error = fs.Mount(imageFormat, wholePart, encoding, optionsDict);
if(error == Errno.NoError)
{
List rootDir = new List();
- error = fs.ReadDir("/", out rootDir);
+ error = fs.ReadDir("/", out rootDir);
if(error == Errno.NoError)
foreach(string entry in rootDir)
{
@@ -486,7 +501,7 @@ namespace DiscImageChef.Commands
if(error == Errno.NoError)
{
FileStream outputFile;
- string outputPath;
+ string outputPath;
if(options.Xattrs)
{
List xattrs = new List();
@@ -496,7 +511,7 @@ namespace DiscImageChef.Commands
foreach(string xattr in xattrs)
{
byte[] xattrBuf = new byte[0];
- error = fs.GetXattr(entry, xattr, ref xattrBuf);
+ error = fs.GetXattr(entry, xattr, ref xattrBuf);
if(error != Errno.NoError) continue;
Directory.CreateDirectory(Path.Combine(options.OutputDir,
@@ -516,31 +531,33 @@ namespace DiscImageChef.Commands
outputFile.Write(xattrBuf, 0, xattrBuf.Length);
outputFile.Close();
FileInfo fi = new FileInfo(outputPath);
-#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
+ #pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
try { fi.CreationTimeUtc = stat.CreationTimeUtc; }
catch
{
// ignored
}
+
try { fi.LastWriteTimeUtc = stat.LastWriteTimeUtc; }
catch
{
// ignored
}
+
try { fi.LastAccessTimeUtc = stat.AccessTimeUtc; }
catch
{
// ignored
}
-#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
+ #pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
DicConsole
- .WriteLine("Written {0} bytes of xattr {1} from file {2} to {3}",
- xattrBuf.Length, xattr, entry, outputPath);
+ .WriteLine("Written {0} bytes of xattr {1} from file {2} to {3}",
+ xattrBuf.Length, xattr, entry, outputPath);
}
else
DicConsole
- .ErrorWriteLine("Cannot write xattr {0} for {1}, output exists",
- xattr, entry);
+ .ErrorWriteLine("Cannot write xattr {0} for {1}, output exists",
+ xattr, entry);
}
}
@@ -564,23 +581,25 @@ namespace DiscImageChef.Commands
outputFile.Write(outBuf, 0, outBuf.Length);
outputFile.Close();
FileInfo fi = new FileInfo(outputPath);
-#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
+ #pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
try { fi.CreationTimeUtc = stat.CreationTimeUtc; }
catch
{
// ignored
}
+
try { fi.LastWriteTimeUtc = stat.LastWriteTimeUtc; }
catch
{
// ignored
}
+
try { fi.LastAccessTimeUtc = stat.AccessTimeUtc; }
catch
{
// ignored
}
-#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
+ #pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
DicConsole.WriteLine("Written {0} bytes of file {1} to {2}",
outBuf.Length, entry, outputPath);
}
@@ -606,13 +625,13 @@ namespace DiscImageChef.Commands
{
plugins.ReadOnlyFilesystems.TryGetValue(idPlugins[0], out plugin);
DicConsole.WriteLine($"Identified by {plugin.Name}.");
- IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin
- .GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { });
- error = fs.Mount(imageFormat, wholePart, encoding, options.Debug);
+ IReadOnlyFilesystem fs =
+ (IReadOnlyFilesystem)plugin.GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { });
+ error = fs.Mount(imageFormat, wholePart, encoding, optionsDict);
if(error == Errno.NoError)
{
List rootDir = new List();
- error = fs.ReadDir("/", out rootDir);
+ error = fs.ReadDir("/", out rootDir);
if(error == Errno.NoError)
foreach(string entry in rootDir)
{
@@ -625,7 +644,7 @@ namespace DiscImageChef.Commands
error = fs.Stat(entry, out stat);
if(error == Errno.NoError)
{
- string outputPath;
+ string outputPath;
FileStream outputFile;
if(options.Xattrs)
{
@@ -636,7 +655,7 @@ namespace DiscImageChef.Commands
foreach(string xattr in xattrs)
{
byte[] xattrBuf = new byte[0];
- error = fs.GetXattr(entry, xattr, ref xattrBuf);
+ error = fs.GetXattr(entry, xattr, ref xattrBuf);
if(error != Errno.NoError) continue;
Directory.CreateDirectory(Path.Combine(options.OutputDir,
@@ -655,31 +674,33 @@ namespace DiscImageChef.Commands
outputFile.Write(xattrBuf, 0, xattrBuf.Length);
outputFile.Close();
FileInfo fi = new FileInfo(outputPath);
-#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
+ #pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
try { fi.CreationTimeUtc = stat.CreationTimeUtc; }
catch
{
// ignored
}
+
try { fi.LastWriteTimeUtc = stat.LastWriteTimeUtc; }
catch
{
// ignored
}
+
try { fi.LastAccessTimeUtc = stat.AccessTimeUtc; }
catch
{
// ignored
}
-#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
+ #pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
DicConsole
- .WriteLine("Written {0} bytes of xattr {1} from file {2} to {3}",
- xattrBuf.Length, xattr, entry, outputPath);
+ .WriteLine("Written {0} bytes of xattr {1} from file {2} to {3}",
+ xattrBuf.Length, xattr, entry, outputPath);
}
else
DicConsole
- .ErrorWriteLine("Cannot write xattr {0} for {1}, output exists",
- xattr, entry);
+ .ErrorWriteLine("Cannot write xattr {0} for {1}, output exists",
+ xattr, entry);
}
}
@@ -701,23 +722,25 @@ namespace DiscImageChef.Commands
outputFile.Write(outBuf, 0, outBuf.Length);
outputFile.Close();
FileInfo fi = new FileInfo(outputPath);
-#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
+ #pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
try { fi.CreationTimeUtc = stat.CreationTimeUtc; }
catch
{
// ignored
}
+
try { fi.LastWriteTimeUtc = stat.LastWriteTimeUtc; }
catch
{
// ignored
}
+
try { fi.LastAccessTimeUtc = stat.AccessTimeUtc; }
catch
{
// ignored
}
-#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
+ #pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
DicConsole.WriteLine("Written {0} bytes of file {1} to {2}", outBuf.Length,
entry, outputPath);
}
diff --git a/DiscImageChef/Commands/Ls.cs b/DiscImageChef/Commands/Ls.cs
index eb2bfbc8c..59f5e3c8b 100644
--- a/DiscImageChef/Commands/Ls.cs
+++ b/DiscImageChef/Commands/Ls.cs
@@ -46,12 +46,14 @@ namespace DiscImageChef.Commands
{
internal static void DoLs(LsOptions options)
{
- DicConsole.DebugWriteLine("Ls command", "--debug={0}", options.Debug);
+ DicConsole.DebugWriteLine("Ls command", "--debug={0}", options.Debug);
DicConsole.DebugWriteLine("Ls command", "--verbose={0}", options.Verbose);
- DicConsole.DebugWriteLine("Ls command", "--input={0}", options.InputFile);
+ DicConsole.DebugWriteLine("Ls command", "--input={0}", options.InputFile);
- FiltersList filtersList = new FiltersList();
- IFilter inputFilter = filtersList.GetFilter(options.InputFile);
+ FiltersList filtersList = new FiltersList();
+ IFilter inputFilter = filtersList.GetFilter(options.InputFile);
+ Dictionary optionsDict =
+ new Dictionary {{"debug", options.Debug.ToString()}};
if(inputFilter == null)
{
@@ -120,9 +122,9 @@ namespace DiscImageChef.Commands
List partitions = Core.Partitions.GetAll(imageFormat);
Core.Partitions.AddSchemesToStats(partitions);
- List idPlugins;
+ List idPlugins;
IReadOnlyFilesystem plugin;
- Errno error;
+ Errno error;
if(partitions.Count == 0) DicConsole.DebugWriteLine("Ls command", "No partitions found");
else
{
@@ -136,7 +138,7 @@ namespace DiscImageChef.Commands
DicConsole.WriteLine("Identifying filesystem on partition");
Core.Filesystems.Identify(imageFormat, out idPlugins, partitions[i]);
- if(idPlugins.Count == 0) DicConsole.WriteLine("Filesystem not identified");
+ if(idPlugins.Count == 0) DicConsole.WriteLine("Filesystem not identified");
else if(idPlugins.Count > 1)
{
DicConsole.WriteLine($"Identified by {idPlugins.Count} plugins");
@@ -146,17 +148,20 @@ namespace DiscImageChef.Commands
{
DicConsole.WriteLine($"As identified by {plugin.Name}.");
IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin
- .GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { });
+ .GetType()
+ .GetConstructor(Type.EmptyTypes)
+ ?.Invoke(new object[] { });
if(fs == null) continue;
- error = fs.Mount(imageFormat, partitions[i], encoding, options.Debug);
+ error = fs.Mount(imageFormat, partitions[i], encoding, optionsDict);
if(error == Errno.NoError)
{
List rootDir = new List();
- error = fs.ReadDir("/", out rootDir);
+ error = fs.ReadDir("/", out rootDir);
if(error == Errno.NoError)
- foreach(string entry in rootDir) DicConsole.WriteLine("{0}", entry);
+ foreach(string entry in rootDir)
+ DicConsole.WriteLine("{0}", entry);
else
DicConsole.ErrorWriteLine("Error {0} reading root directory {0}",
error.ToString());
@@ -175,16 +180,18 @@ namespace DiscImageChef.Commands
DicConsole.WriteLine($"Identified by {plugin.Name}.");
IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin
- .GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { });
+ .GetType().GetConstructor(Type.EmptyTypes)
+ ?.Invoke(new object[] { });
if(fs == null) continue;
- error = fs.Mount(imageFormat, partitions[i], encoding, options.Debug);
+ error = fs.Mount(imageFormat, partitions[i], encoding, optionsDict);
if(error == Errno.NoError)
{
List rootDir = new List();
- error = fs.ReadDir("/", out rootDir);
+ error = fs.ReadDir("/", out rootDir);
if(error == Errno.NoError)
- foreach(string entry in rootDir) DicConsole.WriteLine("{0}", entry);
+ foreach(string entry in rootDir)
+ DicConsole.WriteLine("{0}", entry);
else
DicConsole.ErrorWriteLine("Error {0} reading root directory {0}", error.ToString());
@@ -197,13 +204,13 @@ namespace DiscImageChef.Commands
Partition wholePart = new Partition
{
- Name = "Whole device",
+ Name = "Whole device",
Length = imageFormat.Info.Sectors,
- Size = imageFormat.Info.Sectors * imageFormat.Info.SectorSize
+ Size = imageFormat.Info.Sectors * imageFormat.Info.SectorSize
};
Core.Filesystems.Identify(imageFormat, out idPlugins, wholePart);
- if(idPlugins.Count == 0) DicConsole.WriteLine("Filesystem not identified");
+ if(idPlugins.Count == 0) DicConsole.WriteLine("Filesystem not identified");
else if(idPlugins.Count > 1)
{
DicConsole.WriteLine($"Identified by {idPlugins.Count} plugins");
@@ -213,16 +220,18 @@ namespace DiscImageChef.Commands
{
DicConsole.WriteLine($"As identified by {plugin.Name}.");
IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin
- .GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { });
+ .GetType().GetConstructor(Type.EmptyTypes)
+ ?.Invoke(new object[] { });
if(fs == null) continue;
- error = fs.Mount(imageFormat, wholePart, encoding, options.Debug);
+ error = fs.Mount(imageFormat, wholePart, encoding, optionsDict);
if(error == Errno.NoError)
{
List rootDir = new List();
- error = fs.ReadDir("/", out rootDir);
+ error = fs.ReadDir("/", out rootDir);
if(error == Errno.NoError)
- foreach(string entry in rootDir) DicConsole.WriteLine("{0}", entry);
+ foreach(string entry in rootDir)
+ DicConsole.WriteLine("{0}", entry);
else
DicConsole.ErrorWriteLine("Error {0} reading root directory {0}", error.ToString());
@@ -237,21 +246,22 @@ namespace DiscImageChef.Commands
if(plugin != null)
{
DicConsole.WriteLine($"Identified by {plugin.Name}.");
- IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin
- .GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { });
+ IReadOnlyFilesystem fs =
+ (IReadOnlyFilesystem)plugin
+ .GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { });
if(fs != null)
{
- error = fs.Mount(imageFormat, wholePart, encoding, options.Debug);
+ error = fs.Mount(imageFormat, wholePart, encoding, optionsDict);
if(error == Errno.NoError)
{
List rootDir = new List();
- error = fs.ReadDir("/", out rootDir);
+ error = fs.ReadDir("/", out rootDir);
if(error == Errno.NoError)
foreach(string entry in rootDir)
if(options.Long)
{
- FileEntryInfo stat = new FileEntryInfo();
- List xattrs = new List();
+ FileEntryInfo stat = new FileEntryInfo();
+ List xattrs = new List();
error = fs.Stat(entry, out stat);
if(error == Errno.NoError)
@@ -265,7 +275,7 @@ namespace DiscImageChef.Commands
foreach(string xattr in xattrs)
{
byte[] xattrBuf = new byte[0];
- error = fs.GetXattr(entry, xattr, ref xattrBuf);
+ error = fs.GetXattr(entry, xattr, ref xattrBuf);
if(error == Errno.NoError)
DicConsole.WriteLine("\t\t{0}\t{1} bytes", xattr,
xattrBuf.Length);
@@ -273,7 +283,8 @@ namespace DiscImageChef.Commands
}
else DicConsole.WriteLine("{0}", entry);
}
- else DicConsole.WriteLine("{0}", entry);
+ else
+ DicConsole.WriteLine("{0}", entry);
else
DicConsole.ErrorWriteLine("Error {0} reading root directory {0}", error.ToString());