diff --git a/RombaSharp/Partials/RombaSharp_Inits.cs b/RombaSharp/Partials/RombaSharp_Inits.cs
index 31a0f4fc..39a6f93c 100644
--- a/RombaSharp/Partials/RombaSharp_Inits.cs
+++ b/RombaSharp/Partials/RombaSharp_Inits.cs
@@ -71,7 +71,7 @@ namespace SabreTools
foreach (string input in inputs)
{
DATFromDir dfd = new DATFromDir(input, datdata, false /* noMD5 */, false /* noSHA1 */, true /* bare */, false /* archivesAsFiles */,
- true /* enableGzip */, false /* addBlanks */, false /* addDate */, "__temp__" /* tempdir */, 4 /* maxDegreeOfParallelism */, _logger);
+ true /* enableGzip */, false /* addBlanks */, false /* addDate */, "__temp__" /* tempDir */, 4 /* maxDegreeOfParallelism */, _logger);
dfd.Start();
DatTools.WriteDatfile(dfd.DatData, "", logger);
}
diff --git a/SabreTools.Helper/Objects/DATFromDir.cs b/SabreTools.Helper/Objects/DATFromDir.cs
index 01ea7c94..01f781c7 100644
--- a/SabreTools.Helper/Objects/DATFromDir.cs
+++ b/SabreTools.Helper/Objects/DATFromDir.cs
@@ -66,7 +66,7 @@ namespace SabreTools
_enableGzip = enableGzip;
_addBlanks = addBlanks;
_addDate = addDate;
- _tempDir = (String.IsNullOrEmpty(tempDir) ? Path.Combine(Path.GetTempPath(), "__temp__") : tempDir);
+ _tempDir = (String.IsNullOrEmpty(tempDir) ? Path.GetTempPath() : tempDir);
_maxDegreeOfParallelism = maxDegreeOfParallelism;
_logger = logger;
}
diff --git a/SabreTools.Helper/Objects/Generate.cs b/SabreTools.Helper/Objects/Generate.cs
index 803a5510..bd43c90f 100644
--- a/SabreTools.Helper/Objects/Generate.cs
+++ b/SabreTools.Helper/Objects/Generate.cs
@@ -14,7 +14,7 @@ namespace SabreTools
// Private instance variables
private string _systems;
private string _sources;
- private string _outdir;
+ private string _outDir;
private string _connectionString;
private bool _norename;
private bool _old;
@@ -27,12 +27,12 @@ namespace SabreTools
///
/// Comma-separated list of systems to be included in the DAT (blank means all)
/// Comma-separated list of sources to be included in the DAT (blank means all)
- /// The output folder where the generated DAT will be put; blank means the current directory
+ /// The output folder where the generated DAT will be put; blank means the current directory
/// Connection string for SQLite
/// Logger object for file or console output
/// True if files should not be renamed with system and/or source in merged mode (default false)
/// True if the output file should be in ClrMamePro format (default false)
- public Generate(string systems, string sources, string outdir, string connectionString, Logger logger, bool norename = false, bool old = false)
+ public Generate(string systems, string sources, string outDir, string connectionString, Logger logger, bool norename = false, bool old = false)
{
_systems = systems;
_sources = sources;
@@ -42,12 +42,12 @@ namespace SabreTools
_logger = logger;
// Take care of special outfolder cases
- _outdir = (outdir == "" ? Environment.CurrentDirectory + Path.DirectorySeparatorChar :
- (!outdir.EndsWith(Path.DirectorySeparatorChar.ToString()) ? outdir + Path.DirectorySeparatorChar : outdir)
+ _outDir = (outDir == "" ? Environment.CurrentDirectory + Path.DirectorySeparatorChar :
+ (!outDir.EndsWith(Path.DirectorySeparatorChar.ToString()) ? outDir + Path.DirectorySeparatorChar : outDir)
);
- if (_outdir != "" && !Directory.Exists(_outdir))
+ if (_outDir != "" && !Directory.Exists(_outDir))
{
- Directory.CreateDirectory(_outdir);
+ Directory.CreateDirectory(_outDir);
}
}
@@ -179,7 +179,7 @@ namespace SabreTools
Files = dict,
};
- return DatTools.WriteDatfile(datdata, _outdir, _logger);
+ return DatTools.WriteDatfile(datdata, _outDir, _logger);
}
///
diff --git a/SabreTools.Helper/Objects/Headerer.cs b/SabreTools.Helper/Objects/Headerer.cs
index a3cb5529..e0304be4 100644
--- a/SabreTools.Helper/Objects/Headerer.cs
+++ b/SabreTools.Helper/Objects/Headerer.cs
@@ -14,7 +14,7 @@ namespace SabreTools
// Private instance variables
private List _inputs;
private bool _restore;
- private string _outdir;
+ private string _outDir;
private Logger _logger;
///
@@ -22,13 +22,13 @@ namespace SabreTools
///
/// Input file or folder names
/// False if we're extracting headers (default), true if we're restoring them
- /// Output directory to write new files to, blank defaults to rom folder
+ /// Output directory to write new files to, blank defaults to rom folder
/// Logger object for file and console output
- public Headerer(List inputs, bool restore, string outdir, Logger logger)
+ public Headerer(List inputs, bool restore, string outDir, Logger logger)
{
_inputs = inputs;
_restore = restore;
- _outdir = outdir;
+ _outDir = outDir;
_logger = logger;
}
@@ -38,9 +38,9 @@ namespace SabreTools
/// True if it succeeded, false otherwise
public bool Process()
{
- if (_outdir != "" && !Directory.Exists(_outdir))
+ if (_outDir != "" && !Directory.Exists(_outDir))
{
- Directory.CreateDirectory(_outdir);
+ Directory.CreateDirectory(_outDir);
}
bool success = true;
@@ -121,7 +121,7 @@ namespace SabreTools
}
// Otherwise, apply the rule to the file
- string newfile = (_outdir == "" ? Path.GetFullPath(file) + ".new" : Path.Combine(_outdir, Path.GetFileName(file)));
+ string newfile = (_outDir == "" ? Path.GetFullPath(file) + ".new" : Path.Combine(_outDir, Path.GetFileName(file)));
Skippers.TransformFile(file, newfile, rule, _logger);
// If the output file doesn't exist, return false
@@ -208,9 +208,9 @@ namespace SabreTools
header = sldr.GetString(0);
_logger.User("Creating reheadered file: " +
- (_outdir == "" ? Path.GetFullPath(file) + ".new" : Path.Combine(_outdir, Path.GetFileName(file))) + sub);
+ (_outDir == "" ? Path.GetFullPath(file) + ".new" : Path.Combine(_outDir, Path.GetFileName(file))) + sub);
FileTools.AppendBytesToFile(file,
- (_outdir == "" ? Path.GetFullPath(file) + ".new" : Path.Combine(_outdir, Path.GetFileName(file))) + sub, header, string.Empty);
+ (_outDir == "" ? Path.GetFullPath(file) + ".new" : Path.Combine(_outDir, Path.GetFileName(file))) + sub, header, string.Empty);
_logger.User("Reheadered file created!");
}
}
diff --git a/SabreTools.Helper/Objects/SimpleSort.cs b/SabreTools.Helper/Objects/SimpleSort.cs
index 9dd0e0c1..12985bc4 100644
--- a/SabreTools.Helper/Objects/SimpleSort.cs
+++ b/SabreTools.Helper/Objects/SimpleSort.cs
@@ -9,8 +9,8 @@ namespace SabreTools.Helper
// Private instance variables
private Dat _datdata;
private List _inputs;
- private string _outdir;
- private string _tempdir;
+ private string _outDir;
+ private string _tempDir;
private bool _quickScan;
private bool _toFolder;
private bool _verify;
@@ -34,8 +34,8 @@ namespace SabreTools.Helper
///
/// Name of the DAT to compare against
/// List of input files/folders to check
- /// Output directory to use to build to
- /// Temporary directory for archive extraction
+ /// Output directory to use to build to
+ /// Temporary directory for archive extraction
/// True to enable external scanning of archives, false otherwise
/// True if files should be output to folder, false otherwise
/// True if output directory should be checked instead of rebuilt to, false otherwise
@@ -48,14 +48,14 @@ namespace SabreTools.Helper
/// Integer representing the archive handling level for Zip
/// True if the updated DAT should be output, false otherwise
/// Logger object for file and console output
- public SimpleSort(Dat datdata, List inputs, string outdir, string tempdir,
+ public SimpleSort(Dat datdata, List inputs, string outDir, string tempDir,
bool quickScan, bool toFolder, bool verify, bool delete, bool? torrentX, bool romba, int sevenzip,
int gz, int rar, int zip, bool updateDat, Logger logger)
{
_datdata = datdata;
_inputs = inputs;
- _outdir = (outdir == "" ? "Rebuild" : outdir);
- _tempdir = (tempdir == "" ? Path.Combine(Path.GetTempPath(), "__temp__") : tempdir);
+ _outDir = (outDir == "" ? "Rebuild" : outDir);
+ _tempDir = (String.IsNullOrEmpty(tempDir) ? Path.GetTempPath() : tempDir);
_quickScan = quickScan;
_toFolder = toFolder;
_verify = verify;
@@ -84,20 +84,20 @@ namespace SabreTools.Helper
public bool StartProcessing()
{
// First, check that the output directory exists
- if (!Directory.Exists(_outdir))
+ if (!Directory.Exists(_outDir))
{
- Directory.CreateDirectory(_outdir);
- _outdir = Path.GetFullPath(_outdir);
+ Directory.CreateDirectory(_outDir);
+ _outDir = Path.GetFullPath(_outDir);
}
// Then create or clean the temp directory
- if (!Directory.Exists(_tempdir))
+ if (!Directory.Exists(_tempDir))
{
- Directory.CreateDirectory(_tempdir);
+ Directory.CreateDirectory(_tempDir);
}
else
{
- FileTools.CleanDirectory(_tempdir);
+ FileTools.CleanDirectory(_tempDir);
}
if (_verify)
@@ -120,7 +120,7 @@ namespace SabreTools.Helper
// Enumerate all files from the output directory
List files = new List();
- foreach (string file in Directory.EnumerateFiles(_outdir, "*", SearchOption.AllDirectories))
+ foreach (string file in Directory.EnumerateFiles(_outDir, "*", SearchOption.AllDirectories))
{
_logger.Log("File found: '" + file + "'");
files.Add(Path.GetFullPath(file));
@@ -135,7 +135,7 @@ namespace SabreTools.Helper
foreach (string input in _inputs)
{
DATFromDir dfd = new DATFromDir(input, _datdata, false /* noMD5 */, false /* noSHA1 */, true /* bare */, false /* archivesAsFiles */,
- true /* enableGzip */, false /* addBlanks */, false /* addDate */, "" /* tempdir */, 4 /* maxDegreeOfParallelism */, _logger);
+ true /* enableGzip */, false /* addBlanks */, false /* addDate */, "" /* tempDir */, 4 /* maxDegreeOfParallelism */, _logger);
dfd.Start();
_datdata = dfd.DatData;
}
@@ -224,15 +224,15 @@ namespace SabreTools.Helper
for (int i = 0; i < files.Count; i++)
{
success &= RebuildToOutputHelper(files[i], i, files.Count);
- FileTools.CleanDirectory(_tempdir);
+ FileTools.CleanDirectory(_tempDir);
}
// Now one final delete of the temp directory
- while (Directory.Exists(_tempdir))
+ while (Directory.Exists(_tempDir))
{
try
{
- Directory.Delete(_tempdir, true);
+ Directory.Delete(_tempDir, true);
}
catch
{
@@ -315,7 +315,7 @@ namespace SabreTools.Helper
if (_toFolder)
{
// Copy file to output directory
- string gamedir = Path.Combine(_outdir, found.Machine.Name);
+ string gamedir = Path.Combine(_outDir, found.Machine.Name);
if (!Directory.Exists(gamedir))
{
Directory.CreateDirectory(gamedir);
@@ -332,15 +332,15 @@ namespace SabreTools.Helper
{
if (_torrentX == true)
{
- FileTools.WriteTorrentZip(input, _outdir, found, _logger);
+ FileTools.WriteTorrentZip(input, _outDir, found, _logger);
}
else if (_torrentX == false)
{
- FileTools.WriteTorrentGZ(input, _outdir, _romba, _logger);
+ FileTools.WriteTorrentGZ(input, _outDir, _romba, _logger);
}
else
{
- FileTools.WriteToArchive(input, _outdir, found);
+ FileTools.WriteToArchive(input, _outDir, found);
}
}
}
@@ -386,7 +386,7 @@ namespace SabreTools.Helper
if (_toFolder)
{
// Copy file to output directory
- string gamedir = Path.Combine(_outdir, found.Machine.Name);
+ string gamedir = Path.Combine(_outDir, found.Machine.Name);
if (!Directory.Exists(gamedir))
{
Directory.CreateDirectory(gamedir);
@@ -403,15 +403,15 @@ namespace SabreTools.Helper
{
if (_torrentX == true)
{
- FileTools.WriteTorrentZip(newinput, _outdir, found, _logger);
+ FileTools.WriteTorrentZip(newinput, _outDir, found, _logger);
}
else if (_torrentX == false)
{
- FileTools.WriteTorrentGZ(newinput, _outdir, _romba, _logger);
+ FileTools.WriteTorrentGZ(newinput, _outDir, _romba, _logger);
}
else
{
- FileTools.WriteToArchive(newinput, _outdir, found);
+ FileTools.WriteToArchive(newinput, _outDir, found);
}
}
@@ -436,7 +436,7 @@ namespace SabreTools.Helper
if (_toFolder)
{
// Copy file to output directory
- string gamedir = Path.Combine(_outdir, found.Machine.Name);
+ string gamedir = Path.Combine(_outDir, found.Machine.Name);
if (!Directory.Exists(gamedir))
{
Directory.CreateDirectory(gamedir);
@@ -454,15 +454,15 @@ namespace SabreTools.Helper
_logger.Log("Matched name: " + newfound.Name);
if (_torrentX == true)
{
- FileTools.WriteTorrentZip(input, _outdir, newfound, _logger);
+ FileTools.WriteTorrentZip(input, _outDir, newfound, _logger);
}
else if (_torrentX == false)
{
- FileTools.WriteTorrentGZ(input, _outdir, _romba, _logger);
+ FileTools.WriteTorrentGZ(input, _outDir, _romba, _logger);
}
else
{
- FileTools.WriteToArchive(input, _outdir, newfound);
+ FileTools.WriteToArchive(input, _outDir, newfound);
}
}
}
@@ -516,10 +516,10 @@ namespace SabreTools.Helper
{
// Copy file to output directory
_logger.Log("Rebuilding file '" + Path.GetFileName(rom.Name) + "' to '" + found.Name + "'");
- string outfile = FileTools.ExtractSingleItemFromArchive(input, rom.Name, _tempdir, _logger);
+ string outfile = FileTools.ExtractSingleItemFromArchive(input, rom.Name, _tempDir, _logger);
if (File.Exists(outfile))
{
- string gamedir = Path.Combine(_outdir, found.Machine.Name);
+ string gamedir = Path.Combine(_outDir, found.Machine.Name);
if (!Directory.Exists(gamedir))
{
Directory.CreateDirectory(gamedir);
@@ -539,20 +539,20 @@ namespace SabreTools.Helper
if (Build.MonoEnvironment || _torrentX == false)
{
- string outfile = FileTools.ExtractSingleItemFromArchive(input, rom.Name, _tempdir, _logger);
+ string outfile = FileTools.ExtractSingleItemFromArchive(input, rom.Name, _tempDir, _logger);
if (File.Exists(outfile))
{
if (_torrentX == true)
{
- FileTools.WriteTorrentZip(outfile, _outdir, found, _logger);
+ FileTools.WriteTorrentZip(outfile, _outDir, found, _logger);
}
else if (_torrentX == false)
{
- FileTools.WriteTorrentGZ(outfile, _outdir, _romba, _logger);
+ FileTools.WriteTorrentGZ(outfile, _outDir, _romba, _logger);
}
else
{
- FileTools.WriteToArchive(outfile, _outdir, found);
+ FileTools.WriteToArchive(outfile, _outDir, found);
}
try
@@ -564,7 +564,7 @@ namespace SabreTools.Helper
}
else
{
- FileTools.CopyFileBetweenArchives(input, _outdir, rom.Name, found, _logger);
+ FileTools.CopyFileBetweenArchives(input, _outDir, rom.Name, found, _logger);
}
}
}
@@ -574,7 +574,7 @@ namespace SabreTools.Helper
else
{
// Now, if the file is a supported archive type, also run on all files within
- bool encounteredErrors = FileTools.ExtractArchive(input, _tempdir, _7z, _gz, _rar, _zip, _logger);
+ bool encounteredErrors = FileTools.ExtractArchive(input, _tempDir, _7z, _gz, _rar, _zip, _logger);
// Remove the current file if we are in recursion so it's not picked up in the next step
if (recurse)
@@ -593,7 +593,7 @@ namespace SabreTools.Helper
if (!encounteredErrors)
{
_logger.Log("Archive found! Successfully extracted");
- foreach (string file in Directory.EnumerateFiles(_tempdir, "*", SearchOption.AllDirectories))
+ foreach (string file in Directory.EnumerateFiles(_tempDir, "*", SearchOption.AllDirectories))
{
success &= RebuildToOutputHelper(file, index, total, true);
}
@@ -627,14 +627,14 @@ namespace SabreTools.Helper
*/
// Assuming archived sets, move all toplevel folders to temp
- foreach (string directory in Directory.EnumerateDirectories(_outdir, "*", SearchOption.TopDirectoryOnly))
+ foreach (string directory in Directory.EnumerateDirectories(_outDir, "*", SearchOption.TopDirectoryOnly))
{
- Directory.Move(directory, Path.Combine(_tempdir, Path.GetFileNameWithoutExtension(directory)));
+ Directory.Move(directory, Path.Combine(_tempDir, Path.GetFileNameWithoutExtension(directory)));
}
// Now process the inputs (assumed that it's archived sets as of right now
Dictionary> scanned = new Dictionary>();
- foreach (string archive in Directory.EnumerateFiles(_outdir, "*", SearchOption.AllDirectories))
+ foreach (string archive in Directory.EnumerateFiles(_outDir, "*", SearchOption.AllDirectories))
{
// If we are in quickscan, get the list of roms that way
List roms = new List();
@@ -645,7 +645,7 @@ namespace SabreTools.Helper
// Otherwise, extract it and get info one by one
else
{
- string temparcdir = Path.Combine(_tempdir, Path.GetFileNameWithoutExtension(archive));
+ string temparcdir = Path.Combine(_tempDir, Path.GetFileNameWithoutExtension(archive));
FileTools.ExtractArchive(Path.GetFullPath(archive), temparcdir, _logger);
foreach (string tempfile in Directory.EnumerateFiles(temparcdir, "*", SearchOption.AllDirectories))
{
@@ -745,20 +745,20 @@ namespace SabreTools.Helper
bool success = true;
// First, check that the output directory exists
- if (!Directory.Exists(_outdir))
+ if (!Directory.Exists(_outDir))
{
- Directory.CreateDirectory(_outdir);
- _outdir = Path.GetFullPath(_outdir);
+ Directory.CreateDirectory(_outDir);
+ _outDir = Path.GetFullPath(_outDir);
}
// Then create or clean the temp directory
- if (!Directory.Exists(_tempdir))
+ if (!Directory.Exists(_tempDir))
{
- Directory.CreateDirectory(_tempdir);
+ Directory.CreateDirectory(_tempDir);
}
else
{
- FileTools.CleanDirectory(_tempdir);
+ FileTools.CleanDirectory(_tempDir);
}
// Now process all of the inputs
@@ -774,26 +774,26 @@ namespace SabreTools.Helper
if (shouldExternalProcess)
{
_logger.User("Processing file " + input);
- success &= FileTools.WriteTorrentGZ(input, _outdir, _romba, _logger);
+ success &= FileTools.WriteTorrentGZ(input, _outDir, _romba, _logger);
}
// Process the file as an archive, if necessary
if (shouldInternalProcess)
{
// Now, if the file is a supported archive type, also run on all files within
- bool encounteredErrors = FileTools.ExtractArchive(input, _tempdir, _7z, _gz, _rar, _zip, _logger);
+ bool encounteredErrors = FileTools.ExtractArchive(input, _tempDir, _7z, _gz, _rar, _zip, _logger);
// If no errors were encountered, we loop through the temp directory
if (!encounteredErrors)
{
_logger.Log("Archive found! Successfully extracted");
- foreach (string file in Directory.EnumerateFiles(_tempdir, "*", SearchOption.AllDirectories))
+ foreach (string file in Directory.EnumerateFiles(_tempDir, "*", SearchOption.AllDirectories))
{
_logger.User("Processing extracted file " + file);
- success &= FileTools.WriteTorrentGZ(file, _outdir, _romba, _logger);
+ success &= FileTools.WriteTorrentGZ(file, _outDir, _romba, _logger);
}
- FileTools.CleanDirectory(_tempdir);
+ FileTools.CleanDirectory(_tempDir);
}
}
@@ -814,11 +814,11 @@ namespace SabreTools.Helper
}
// Now one final delete of the temp directory
- while (Directory.Exists(_tempdir))
+ while (Directory.Exists(_tempDir))
{
try
{
- Directory.Delete(_tempdir, true);
+ Directory.Delete(_tempDir, true);
}
catch
{
@@ -827,19 +827,19 @@ namespace SabreTools.Helper
}
// If we're in romba mode and the size file doesn't exist, create it
- if (_romba && !File.Exists(Path.Combine(_outdir, ".romba_size")))
+ if (_romba && !File.Exists(Path.Combine(_outDir, ".romba_size")))
{
// Get the size of all of the files in the output folder
long size = 0;
- foreach (string file in Directory.EnumerateFiles(_outdir, "*", SearchOption.AllDirectories))
+ foreach (string file in Directory.EnumerateFiles(_outDir, "*", SearchOption.AllDirectories))
{
FileInfo tempinfo = new FileInfo(file);
size += tempinfo.Length;
}
// Write out the value to each of the romba depot files
- using (StreamWriter tw = new StreamWriter(File.Open(Path.Combine(_outdir, ".romba_size"), FileMode.Create, FileAccess.Write)))
- using (StreamWriter twb = new StreamWriter(File.Open(Path.Combine(_outdir, ".romba_size.backup"), FileMode.Create, FileAccess.Write)))
+ using (StreamWriter tw = new StreamWriter(File.Open(Path.Combine(_outDir, ".romba_size"), FileMode.Create, FileAccess.Write)))
+ using (StreamWriter twb = new StreamWriter(File.Open(Path.Combine(_outDir, ".romba_size.backup"), FileMode.Create, FileAccess.Write)))
{
tw.Write(size);
twb.Write(size);
diff --git a/SabreTools.Helper/Tools/DatTools.cs b/SabreTools.Helper/Tools/DatTools.cs
index 056a614c..cf521c03 100644
--- a/SabreTools.Helper/Tools/DatTools.cs
+++ b/SabreTools.Helper/Tools/DatTools.cs
@@ -2103,12 +2103,12 @@ namespace SabreTools.Helper
///
/// Output user defined merge
///
- /// Output directory to write the DATs to
+ /// Output directory to write the DATs to
/// List of inputs to write out from
/// Main DatData to draw information from
/// Dat headers used optionally
/// Logging object for console and file output
- public static void MergeNoDiff(string outdir, Dat userData, List inputs, List datHeaders, Logger logger)
+ public static void MergeNoDiff(string outDir, Dat userData, List inputs, List datHeaders, Logger logger)
{
// If we're in SuperDAT mode, prefix all games with their respective DATs
if (userData.Type == "SuperDAT")
@@ -2137,7 +2137,7 @@ namespace SabreTools.Helper
// Output a DAT only if there are roms
if (userData.Files.Count != 0)
{
- WriteDatfile(userData, outdir, logger);
+ WriteDatfile(userData, outDir, logger);
}
}
@@ -2151,7 +2151,7 @@ namespace SabreTools.Helper
/// Names of the input files and/or folders
/// User specified inputs contained in a DatData object
/// Non-zero flag for output format, zero otherwise for default
- /// Optional param for output directory
+ /// Optional param for output directory
/// True if input files should be merged into a single file, false otherwise
/// Non-zero flag for diffing mode, zero otherwise
/// True if the diffed files should be cascade diffed, false if diffed files should be reverse cascaded, null otherwise
@@ -2175,7 +2175,7 @@ namespace SabreTools.Helper
/// String representing root directory to compare against for length calculation
/// Integer representing the maximum amount of parallelization to be used
/// Logging object for console and file output
- public static void Update(List inputFileNames, Dat datdata, OutputFormat outputFormat, string outputDirectory, bool merge,
+ public static void Update(List inputFileNames, Dat datdata, OutputFormat outputFormat, string outDir, bool merge,
DiffMode diff, bool? cascade, bool inplace, bool skip, bool bare, bool clean, bool softlist, string gamename, string romname, string romtype,
long sgt, long slt, long seq, string crc, string md5, string sha1, bool? nodump, bool trim, bool single, string root, int maxDegreeOfParallelism,
Logger logger)
@@ -2231,23 +2231,23 @@ namespace SabreTools.Helper
// Create a dictionary of all ROMs from the input DATs
Dat userData;
List datHeaders = PopulateUserData(newInputFileNames, inplace, clean, softlist,
- outputDirectory, datdata, out userData, gamename, romname, romtype, sgt, slt, seq,
+ outDir, datdata, out userData, gamename, romname, romtype, sgt, slt, seq,
crc, md5, sha1, nodump, trim, single, root, maxDegreeOfParallelism, logger);
// Modify the Dictionary if necessary and output the results
if (diff != 0 && cascade == null)
{
- DiffNoCascade(diff, outputDirectory, userData, newInputFileNames, logger);
+ DiffNoCascade(diff, outDir, userData, newInputFileNames, logger);
}
// If we're in cascade and diff, output only cascaded diffs
else if (diff != 0 && cascade != null)
{
- DiffCascade(outputDirectory, inplace, userData, newInputFileNames, datHeaders, skip, logger);
+ DiffCascade(outDir, inplace, userData, newInputFileNames, datHeaders, skip, logger);
}
// Output all entries with user-defined merge
else
{
- MergeNoDiff(outputDirectory, userData, newInputFileNames, datHeaders, logger);
+ MergeNoDiff(outDir, userData, newInputFileNames, datHeaders, logger);
}
}
// Otherwise, loop through all of the inputs individually
@@ -2274,7 +2274,7 @@ namespace SabreTools.Helper
// If we have roms, output them
if (innerDatdata.Files.Count != 0)
{
- WriteDatfile(innerDatdata, (outputDirectory == "" ? Path.GetDirectoryName(inputFileName) : outputDirectory), logger, overwrite: (outputDirectory != ""));
+ WriteDatfile(innerDatdata, (outDir == "" ? Path.GetDirectoryName(inputFileName) : outDir), logger, overwrite: (outDir != ""));
}
}
else if (Directory.Exists(inputFileName))
@@ -2294,7 +2294,7 @@ namespace SabreTools.Helper
// If we have roms, output them
if (innerDatdata.Files != null && innerDatdata.Files.Count != 0)
{
- WriteDatfile(innerDatdata, (outputDirectory == "" ? Path.GetDirectoryName(file) : outputDirectory + Path.GetDirectoryName(file).Remove(0, inputFileName.Length - 1)), logger, overwrite: (outputDirectory != ""));
+ WriteDatfile(innerDatdata, (outDir == "" ? Path.GetDirectoryName(file) : outDir + Path.GetDirectoryName(file).Remove(0, inputFileName.Length - 1)), logger, overwrite: (outDir != ""));
}
});
}
@@ -2327,7 +2327,7 @@ namespace SabreTools.Helper
/// Integer representing the maximum amount of parallelization to be used
/// Logging object for console and file output
/// List of DatData objects representing headers
- private static List PopulateUserData(List inputs, bool inplace, bool clean, bool softlist, string outdir,
+ private static List PopulateUserData(List inputs, bool inplace, bool clean, bool softlist, string outDir,
Dat inputDat, out Dat userData, string gamename, string romname, string romtype, long sgt, long slt, long seq, string crc,
string md5, string sha1, bool? nodump, bool trim, bool single, string root, int maxDegreeOfParallelism, Logger logger)
{
@@ -2389,11 +2389,11 @@ namespace SabreTools.Helper
/// Output non-cascading diffs
///
/// Non-zero flag for diffing mode, zero otherwise
- /// Output directory to write the DATs to
+ /// Output directory to write the DATs to
/// Main DatData to draw information from
/// List of inputs to write out from
/// Logging object for console and file output
- public static void DiffNoCascade(DiffMode diff, string outdir, Dat userData, List inputs, Logger logger)
+ public static void DiffNoCascade(DiffMode diff, string outDir, Dat userData, List inputs, Logger logger)
{
DateTime start = DateTime.Now;
logger.User("Initializing all output DATs");
@@ -2532,13 +2532,13 @@ namespace SabreTools.Helper
// Output the difflist (a-b)+(b-a) diff
if ((diff & DiffMode.NoDupes) != 0)
{
- WriteDatfile(outerDiffData, outdir, logger);
+ WriteDatfile(outerDiffData, outDir, logger);
}
// Output the (ab) diff
if ((diff & DiffMode.Dupes) != 0)
{
- WriteDatfile(dupeData, outdir, logger);
+ WriteDatfile(dupeData, outDir, logger);
}
// Output the individual (a-b) DATs
@@ -2547,7 +2547,7 @@ namespace SabreTools.Helper
for (int j = 0; j < inputs.Count; j++)
{
// If we have an output directory set, replace the path
- string path = outdir + (Path.GetDirectoryName(inputs[j].Split('¬')[0]).Remove(0, inputs[j].Split('¬')[1].Length));
+ string path = outDir + (Path.GetDirectoryName(inputs[j].Split('¬')[0]).Remove(0, inputs[j].Split('¬')[1].Length));
// If we have more than 0 roms, output
if (outDats[j].Files.Count > 0)
@@ -2562,14 +2562,14 @@ namespace SabreTools.Helper
///
/// Output cascading diffs
///
- /// Output directory to write the DATs to
+ /// Output directory to write the DATs to
/// True if cascaded diffs are outputted in-place, false otherwise
/// Main DatData to draw information from
/// List of inputs to write out from
/// Dat headers used optionally
/// True if the first cascaded diff file should be skipped on output, false otherwise
/// Logging object for console and file output
- public static void DiffCascade(string outdir, bool inplace, Dat userData, List inputs, List datHeaders, bool skip, Logger logger)
+ public static void DiffCascade(string outDir, bool inplace, Dat userData, List inputs, List datHeaders, bool skip, Logger logger)
{
string post = "";
@@ -2588,7 +2588,7 @@ namespace SabreTools.Helper
Dat diffData;
// If we're in inplace mode, take the appropriate DatData object already stored
- if (inplace || !String.IsNullOrEmpty(outdir))
+ if (inplace || !String.IsNullOrEmpty(outDir))
{
diffData = datHeaders[j];
}
@@ -2646,9 +2646,9 @@ namespace SabreTools.Helper
{
path = Path.GetDirectoryName(inputs[j].Split('¬')[0]);
}
- else if (!String.IsNullOrEmpty(outdir))
+ else if (!String.IsNullOrEmpty(outDir))
{
- path = outdir + (Path.GetDirectoryName(inputs[j].Split('¬')[0]).Remove(0, inputs[j].Split('¬')[1].Length));
+ path = outDir + (Path.GetDirectoryName(inputs[j].Split('¬')[0]).Remove(0, inputs[j].Split('¬')[1].Length));
}
// If we have more than 0 roms, output
@@ -3368,13 +3368,13 @@ namespace SabreTools.Helper
/// Split a DAT by input extensions
///
/// Name of the file to be split
- /// Name of the directory to write the DATs out to
+ /// Name of the directory to write the DATs out to
/// Parent path for replacement
/// List of extensions to split on (first DAT)
/// List of extensions to split on (second DAT)
/// Logger object for console and file writing
/// True if split succeeded, false otherwise
- public static bool SplitByExt(string filename, string outdir, string basepath, List extA, List extB, Logger logger)
+ public static bool SplitByExt(string filename, string outDir, string basepath, List extA, List extB, Logger logger)
{
// Make sure all of the extensions have a dot at the beginning
List newExtA = new List();
@@ -3500,18 +3500,18 @@ namespace SabreTools.Helper
}
// Get the output directory
- if (outdir != "")
+ if (outDir != "")
{
- outdir = outdir + Path.GetDirectoryName(filename).Remove(0, basepath.Length - 1);
+ outDir = outDir + Path.GetDirectoryName(filename).Remove(0, basepath.Length - 1);
}
else
{
- outdir = Path.GetDirectoryName(filename);
+ outDir = Path.GetDirectoryName(filename);
}
// Then write out both files
- bool success = WriteDatfile(datdataA, outdir, logger);
- success &= WriteDatfile(datdataB, outdir, logger);
+ bool success = WriteDatfile(datdataA, outDir, logger);
+ success &= WriteDatfile(datdataB, outDir, logger);
return success;
}
@@ -3520,11 +3520,11 @@ namespace SabreTools.Helper
/// Split a DAT by best available hashes
///
/// Name of the file to be split
- /// Name of the directory to write the DATs out to
+ /// Name of the directory to write the DATs out to
/// Parent path for replacement
/// Logger object for console and file writing
/// True if split succeeded, false otherwise
- public static bool SplitByHash(string filename, string outdir, string basepath, Logger logger)
+ public static bool SplitByHash(string filename, string outDir, string basepath, Logger logger)
{
// Sanitize the basepath to be more predictable
basepath = (basepath.EndsWith(Path.DirectorySeparatorChar.ToString()) ? basepath : basepath + Path.DirectorySeparatorChar);
@@ -3698,13 +3698,13 @@ namespace SabreTools.Helper
}
// Get the output directory
- if (outdir != "")
+ if (outDir != "")
{
- outdir = outdir + Path.GetDirectoryName(filename).Remove(0, basepath.Length - 1);
+ outDir = outDir + Path.GetDirectoryName(filename).Remove(0, basepath.Length - 1);
}
else
{
- outdir = Path.GetDirectoryName(filename);
+ outDir = Path.GetDirectoryName(filename);
}
// Now, output all of the files to the output directory
@@ -3712,19 +3712,19 @@ namespace SabreTools.Helper
bool success = true;
if (nodump.Files.Count > 0)
{
- success &= WriteDatfile(nodump, outdir, logger);
+ success &= WriteDatfile(nodump, outDir, logger);
}
if (sha1.Files.Count > 0)
{
- success &= WriteDatfile(sha1, outdir, logger);
+ success &= WriteDatfile(sha1, outDir, logger);
}
if (md5.Files.Count > 0)
{
- success &= WriteDatfile(md5, outdir, logger);
+ success &= WriteDatfile(md5, outDir, logger);
}
if (crc.Files.Count > 0)
{
- success &= WriteDatfile(crc, outdir, logger);
+ success &= WriteDatfile(crc, outDir, logger);
}
return success;
@@ -3734,11 +3734,11 @@ namespace SabreTools.Helper
/// Split a DAT by type of Rom
///
/// Name of the file to be split
- /// Name of the directory to write the DATs out to
+ /// Name of the directory to write the DATs out to
/// Parent path for replacement
/// Logger object for console and file writing
/// True if split succeeded, false otherwise
- public static bool SplitByType(string filename, string outdir, string basepath, Logger logger)
+ public static bool SplitByType(string filename, string outDir, string basepath, Logger logger)
{
// Sanitize the basepath to be more predictable
basepath = (basepath.EndsWith(Path.DirectorySeparatorChar.ToString()) ? basepath : basepath + Path.DirectorySeparatorChar);
@@ -3877,13 +3877,13 @@ namespace SabreTools.Helper
}
// Get the output directory
- if (outdir != "")
+ if (outDir != "")
{
- outdir = outdir + Path.GetDirectoryName(filename).Remove(0, basepath.Length - 1);
+ outDir = outDir + Path.GetDirectoryName(filename).Remove(0, basepath.Length - 1);
}
else
{
- outdir = Path.GetDirectoryName(filename);
+ outDir = Path.GetDirectoryName(filename);
}
// Now, output all of the files to the output directory
@@ -3891,15 +3891,15 @@ namespace SabreTools.Helper
bool success = true;
if (romdat.Files.Count > 0)
{
- success &= WriteDatfile(romdat, outdir, logger);
+ success &= WriteDatfile(romdat, outDir, logger);
}
if (diskdat.Files.Count > 0)
{
- success &= WriteDatfile(diskdat, outdir, logger);
+ success &= WriteDatfile(diskdat, outDir, logger);
}
if (sampledat.Files.Count > 0)
{
- success &= WriteDatfile(sampledat, outdir, logger);
+ success &= WriteDatfile(sampledat, outDir, logger);
}
return success;
diff --git a/SabreTools.Helper/Tools/FileTools.cs b/SabreTools.Helper/Tools/FileTools.cs
index a96c2a7a..a7698d01 100644
--- a/SabreTools.Helper/Tools/FileTools.cs
+++ b/SabreTools.Helper/Tools/FileTools.cs
@@ -22,10 +22,10 @@ namespace SabreTools.Helper
/// Copy a file to an output archive
///
/// Input filename to be moved
- /// Output directory to build to
+ /// Output directory to build to
/// RomData representing the new information
/// True if the archive was written properly, false otherwise
- public static bool WriteToArchive(string inputFile, string outputDirectory, Rom rom)
+ public static bool WriteToArchive(string inputFile, string outDir, Rom rom)
{
bool success = false;
@@ -35,7 +35,7 @@ namespace SabreTools.Helper
return success;
}
- string archiveFileName = Path.Combine(outputDirectory, rom.Machine.Name + ".zip");
+ string archiveFileName = Path.Combine(outDir, rom.Machine.Name + ".zip");
ZipArchive outarchive = null;
try
@@ -92,11 +92,11 @@ namespace SabreTools.Helper
/// Copy a file to an output torrentzip archive
///
/// Input filename to be moved
- /// Output directory to build to
+ /// Output directory to build to
/// RomData representing the new information
/// Logger object for file and console output
/// True if the archive was written properly, false otherwise
- public static bool WriteTorrentZip(string inputFile, string outputDirectory, Rom rom, Logger logger)
+ public static bool WriteTorrentZip(string inputFile, string outDir, Rom rom, Logger logger)
{
bool success = false;
string tempFile = Path.GetTempFileName();
@@ -107,7 +107,7 @@ namespace SabreTools.Helper
return success;
}
- string archiveFileName = Path.Combine(outputDirectory, rom.Machine.Name + ".zip");
+ string archiveFileName = Path.Combine(outDir, rom.Machine.Name + ".zip");
// If the output file exists but isn't a zip archive, return
if (File.Exists(archiveFileName) && GetCurrentArchiveType(archiveFileName, logger) != ArchiveType.Zip)
@@ -256,12 +256,12 @@ namespace SabreTools.Helper
/// Write an input file to a torrent GZ file
///
/// File to write from
- /// Directory to write archive to
+ /// Directory to write archive to
/// True if files should be output in Romba depot folders, false otherwise
/// Logger object for file and console output
/// True if the write was a success, false otherwise
/// This works for now, but it can be sped up by using Ionic.Zip or another zlib wrapper that allows for header values built-in. See edc's code.
- public static bool WriteTorrentGZ(string input, string outputDirectory, bool romba, Logger logger)
+ public static bool WriteTorrentGZ(string input, string outDir, bool romba, Logger logger)
{
// Check that the input file exists
if (!File.Exists(input))
@@ -272,17 +272,17 @@ namespace SabreTools.Helper
input = Path.GetFullPath(input);
// Make sure the output directory exists
- if (!Directory.Exists(outputDirectory))
+ if (!Directory.Exists(outDir))
{
- Directory.CreateDirectory(outputDirectory);
+ Directory.CreateDirectory(outDir);
}
- outputDirectory = Path.GetFullPath(outputDirectory);
+ outDir = Path.GetFullPath(outDir);
// Now get the Rom info for the file so we have hashes and size
Rom rom = FileTools.GetSingleFileInfo(input);
// If it doesn't exist, create the output file and then write
- string outfile = Path.Combine(outputDirectory, rom.HashData.SHA1 + ".gz");
+ string outfile = Path.Combine(outDir, rom.HashData.SHA1 + ".gz");
using (FileStream inputstream = new FileStream(input, FileMode.Open))
using (GZipStream output = new GZipStream(File.Open(outfile, FileMode.Create, FileAccess.Write), CompressionMode.Compress))
{
@@ -325,15 +325,15 @@ namespace SabreTools.Helper
if (romba)
{
string subfolder = Path.Combine(rom.HashData.SHA1.Substring(0, 2), rom.HashData.SHA1.Substring(2, 2), rom.HashData.SHA1.Substring(4, 2), rom.HashData.SHA1.Substring(6, 2));
- outputDirectory = Path.Combine(outputDirectory, subfolder);
- if (!Directory.Exists(outputDirectory))
+ outDir = Path.Combine(outDir, subfolder);
+ if (!Directory.Exists(outDir))
{
- Directory.CreateDirectory(outputDirectory);
+ Directory.CreateDirectory(outDir);
}
try
{
- File.Move(outfile, Path.Combine(outputDirectory, Path.GetFileName(outfile)));
+ File.Move(outfile, Path.Combine(outDir, Path.GetFileName(outfile)));
}
catch (Exception ex)
{
@@ -353,43 +353,43 @@ namespace SabreTools.Helper
/// Attempt to extract a file as an archive
///
/// Name of the file to be extracted
- /// Temporary directory for archive extraction
+ /// Temporary directory for archive extraction
/// Logger object for file and console output
/// True if the extraction was a success, false otherwise
- public static bool ExtractArchive(string input, string tempdir, Logger logger)
+ public static bool ExtractArchive(string input, string tempDir, Logger logger)
{
- return ExtractArchive(input, tempdir, ArchiveScanLevel.Both, ArchiveScanLevel.External, ArchiveScanLevel.External, ArchiveScanLevel.Both, logger);
+ return ExtractArchive(input, tempDir, ArchiveScanLevel.Both, ArchiveScanLevel.External, ArchiveScanLevel.External, ArchiveScanLevel.Both, logger);
}
///
/// Attempt to extract a file as an archive
///
/// Name of the file to be extracted
- /// Temporary directory for archive extraction
+ /// Temporary directory for archive extraction
/// Integer representing the archive handling level for 7z
/// Integer representing the archive handling level for GZip
/// Integer representing the archive handling level for RAR
/// Integer representing the archive handling level for Zip
/// Logger object for file and console output
/// True if the extraction was a success, false otherwise
- public static bool ExtractArchive(string input, string tempdir, int sevenzip,
+ public static bool ExtractArchive(string input, string tempDir, int sevenzip,
int gz, int rar, int zip, Logger logger)
{
- return ExtractArchive(input, tempdir, (ArchiveScanLevel)sevenzip, (ArchiveScanLevel)gz, (ArchiveScanLevel)rar, (ArchiveScanLevel)zip, logger);
+ return ExtractArchive(input, tempDir, (ArchiveScanLevel)sevenzip, (ArchiveScanLevel)gz, (ArchiveScanLevel)rar, (ArchiveScanLevel)zip, logger);
}
///
/// Attempt to extract a file as an archive
///
/// Name of the file to be extracted
- /// Temporary directory for archive extraction
+ /// Temporary directory for archive extraction
/// Archive handling level for 7z
/// Archive handling level for GZip
/// Archive handling level for RAR
/// Archive handling level for Zip
/// Logger object for file and console output
/// True if the extraction was a success, false otherwise
- public static bool ExtractArchive(string input, string tempdir, ArchiveScanLevel sevenzip,
+ public static bool ExtractArchive(string input, string tempDir, ArchiveScanLevel sevenzip,
ArchiveScanLevel gz, ArchiveScanLevel rar, ArchiveScanLevel zip, Logger logger)
{
bool encounteredErrors = true;
@@ -413,10 +413,10 @@ namespace SabreTools.Helper
logger.Log("Found archive of type: " + at);
// Create the temp directory
- Directory.CreateDirectory(tempdir);
+ Directory.CreateDirectory(tempDir);
// Extract all files to the temp directory
- sza.WriteToDirectory(tempdir, ExtractOptions.ExtractFullPath | ExtractOptions.Overwrite);
+ sza.WriteToDirectory(tempDir, ExtractOptions.ExtractFullPath | ExtractOptions.Overwrite);
encounteredErrors = false;
}
else if (at == ArchiveType.GZip && gz != ArchiveScanLevel.External)
@@ -424,11 +424,11 @@ namespace SabreTools.Helper
logger.Log("Found archive of type: " + at);
// Create the temp directory
- Directory.CreateDirectory(tempdir);
+ Directory.CreateDirectory(tempDir);
using (FileStream itemstream = File.OpenRead(input))
{
- using (FileStream outstream = File.Create(Path.Combine(tempdir, Path.GetFileNameWithoutExtension(input))))
+ using (FileStream outstream = File.Create(Path.Combine(tempDir, Path.GetFileNameWithoutExtension(input))))
{
using (GZipStream gzstream = new GZipStream(itemstream, CompressionMode.Decompress))
{
@@ -447,10 +447,10 @@ namespace SabreTools.Helper
(at == ArchiveType.Rar && rar != ArchiveScanLevel.External))
{
// Create the temp directory
- Directory.CreateDirectory(tempdir);
+ Directory.CreateDirectory(tempDir);
// Extract all files to the temp directory
- reader.WriteAllToDirectory(tempdir, ExtractOptions.ExtractFullPath | ExtractOptions.Overwrite);
+ reader.WriteAllToDirectory(tempDir, ExtractOptions.ExtractFullPath | ExtractOptions.Overwrite);
encounteredErrors = false;
}
}
@@ -482,11 +482,11 @@ namespace SabreTools.Helper
///
/// Name of the archive to be extracted
/// Name of the entry to be extracted
- /// Temporary directory for archive extraction
+ /// Temporary directory for archive extraction
/// Logger object for file and console output
/// Name of the extracted file, null on error
public static string ExtractSingleItemFromArchive(string input, string entryname,
- string tempdir, Logger logger)
+ string tempDir, Logger logger)
{
string outfile = null;
@@ -507,14 +507,14 @@ namespace SabreTools.Helper
if (at == ArchiveType.Zip || at == ArchiveType.SevenZip || at == ArchiveType.Rar)
{
// Create the temp directory
- Directory.CreateDirectory(tempdir);
+ Directory.CreateDirectory(tempDir);
while (reader.MoveToNextEntry())
{
logger.Log("Current entry name: '" + reader.Entry.Key + "'");
if (reader.Entry != null && reader.Entry.Key.Contains(entryname))
{
- outfile = Path.GetFullPath(Path.Combine(tempdir, reader.Entry.Key));
+ outfile = Path.GetFullPath(Path.Combine(tempDir, reader.Entry.Key));
if (!Directory.Exists(Path.GetDirectoryName(outfile)))
{
Directory.CreateDirectory(Path.GetDirectoryName(outfile));
@@ -530,12 +530,12 @@ namespace SabreTools.Helper
using(FileStream itemstream = File.OpenRead(input))
{
- using (FileStream outstream = File.Create(Path.Combine(tempdir, Path.GetFileNameWithoutExtension(input))))
+ using (FileStream outstream = File.Create(Path.Combine(tempDir, Path.GetFileNameWithoutExtension(input))))
{
using (GZipStream gzstream = new GZipStream(itemstream, CompressionMode.Decompress))
{
gzstream.CopyTo(outstream);
- outfile = Path.GetFullPath(Path.Combine(tempdir, Path.GetFileNameWithoutExtension(input)));
+ outfile = Path.GetFullPath(Path.Combine(tempDir, Path.GetFileNameWithoutExtension(input)));
}
}
}
@@ -562,16 +562,16 @@ namespace SabreTools.Helper
/// Attempt to copy a file between archives
///
/// Source archive name
- /// Destination archive name
+ /// Destination archive name
/// Input entry name
/// Output entry name
/// Logger object for file and console output
/// True if the copy was a success, false otherwise
- public static bool CopyFileBetweenArchives(string inputArchive, string outputDirectory,
+ public static bool CopyFileBetweenArchives(string inputArchive, string outDir,
string sourceEntryName, Rom destEntry, Logger logger)
{
string tempfile = ExtractSingleItemFromArchive(inputArchive, sourceEntryName, Path.GetTempPath(), logger);
- return WriteToArchive(tempfile, outputDirectory, destEntry);
+ return WriteToArchive(tempfile, outDir, destEntry);
}
#endregion
diff --git a/SabreTools.Helper/Tools/Style.cs b/SabreTools.Helper/Tools/Style.cs
index 8c8e3bac..a08f4041 100644
--- a/SabreTools.Helper/Tools/Style.cs
+++ b/SabreTools.Helper/Tools/Style.cs
@@ -159,7 +159,7 @@ namespace SabreTools.Helper
// Create the output dictionary
Dictionary outfileNames = new Dictionary();
- // Double check the outdir for the end delim
+ // Double check the outDir for the end delim
if (!outDir.EndsWith(Path.DirectorySeparatorChar.ToString()))
{
outDir += Path.DirectorySeparatorChar;
diff --git a/SabreTools/Partials/SabreTools_Inits.cs b/SabreTools/Partials/SabreTools_Inits.cs
index fac03801..defd583d 100644
--- a/SabreTools/Partials/SabreTools_Inits.cs
+++ b/SabreTools/Partials/SabreTools_Inits.cs
@@ -49,8 +49,8 @@ namespace SabreTools
/// Wrap sorting files using an input DAT
///
/// List of all inputted files and folders
- /// Output directory (empty for default directory)
- /// Temporary directory for archive extraction
+ /// Output directory (empty for default directory)
+ /// Temporary directory for archive extraction
/// True if input files should be deleted, false otherwise
/// True if files should be output in Romba depot folders, false otherwise
/// Integer representing the archive handling level for 7z
@@ -58,7 +58,7 @@ namespace SabreTools
/// Integer representing the archive handling level for RAR
/// Integer representing the archive handling level for Zip
/// Logger object for file and console output
- public static bool InitConvertFolderTGZ(List inputs, string outdir, string tempdir, bool delete,
+ public static bool InitConvertFolderTGZ(List inputs, string outDir, string tempDir, bool delete,
bool romba, int sevenzip, int gz, int rar, int zip, Logger logger)
{
// Get all individual files from the inputs
@@ -78,7 +78,7 @@ namespace SabreTools
}
}
- SimpleSort ss = new SimpleSort(new Dat(), newinputs, outdir, tempdir, false, false, false, delete, false, romba, sevenzip, gz, rar, zip, false, logger);
+ SimpleSort ss = new SimpleSort(new Dat(), newinputs, outDir, tempDir, false, false, false, delete, false, romba, sevenzip, gz, rar, zip, false, logger);
return ss.Convert();
}
@@ -178,8 +178,8 @@ namespace SabreTools
/// Input files or folders to be split
/// First extension to split on
/// Second extension to split on
- /// Output directory for the split files
- private static void InitExtSplit(List inputs, string exta, string extb, string outdir)
+ /// Output directory for the split files
+ private static void InitExtSplit(List inputs, string exta, string extb, string outDir)
{
// Convert comma-separated strings to list
List extaList = exta.Split(',').ToList();
@@ -190,13 +190,13 @@ namespace SabreTools
{
if (File.Exists(input))
{
- DatTools.SplitByExt(Path.GetFullPath(input), outdir, Path.GetDirectoryName(input), extaList, extbList, _logger);
+ DatTools.SplitByExt(Path.GetFullPath(input), outDir, Path.GetDirectoryName(input), extaList, extbList, _logger);
}
else if (Directory.Exists(input))
{
foreach (string file in Directory.EnumerateFiles(input, "*", SearchOption.AllDirectories))
{
- DatTools.SplitByExt(file, outdir, (input.EndsWith(Path.DirectorySeparatorChar.ToString()) ? input : input + Path.DirectorySeparatorChar), extaList, extbList, _logger);
+ DatTools.SplitByExt(file, outDir, (input.EndsWith(Path.DirectorySeparatorChar.ToString()) ? input : input + Path.DirectorySeparatorChar), extaList, extbList, _logger);
}
}
else
@@ -263,21 +263,21 @@ namespace SabreTools
/// Wrap splitting a DAT by best available hashes
///
/// List of inputs to be used
- /// Output directory for the split files
- private static void InitHashSplit(List inputs, string outdir)
+ /// Output directory for the split files
+ private static void InitHashSplit(List inputs, string outDir)
{
// Loop over the input files
foreach (string input in inputs)
{
if (File.Exists(input))
{
- DatTools.SplitByHash(Path.GetFullPath(input), outdir, Path.GetDirectoryName(input), _logger);
+ DatTools.SplitByHash(Path.GetFullPath(input), outDir, Path.GetDirectoryName(input), _logger);
}
else if (Directory.Exists(input))
{
foreach (string file in Directory.EnumerateFiles(input, "*", SearchOption.AllDirectories))
{
- DatTools.SplitByHash(file, outdir, (input.EndsWith(Path.DirectorySeparatorChar.ToString()) ? input : input + Path.DirectorySeparatorChar), _logger);
+ DatTools.SplitByHash(file, outDir, (input.EndsWith(Path.DirectorySeparatorChar.ToString()) ? input : input + Path.DirectorySeparatorChar), _logger);
}
}
else
@@ -295,11 +295,11 @@ namespace SabreTools
///
/// Input file or folder names
/// False if we're extracting headers (default), true if we're restoring them
- /// Output directory to write new files to, blank defaults to rom folder
+ /// Output directory to write new files to, blank defaults to rom folder
/// Logger object for file and console output
- private static void InitHeaderer(List inputs, bool restore, string outdir, Logger logger)
+ private static void InitHeaderer(List inputs, bool restore, string outDir, Logger logger)
{
- Headerer headerer = new Headerer(inputs, restore, outdir, logger);
+ Headerer headerer = new Headerer(inputs, restore, outDir, logger);
headerer.Process();
}
@@ -366,8 +366,8 @@ namespace SabreTools
///
/// Names of the DATs to compare against
/// List of input files/folders to check
- /// Output directory to use to build to
- /// Temporary directory for archive extraction
+ /// Output directory to use to build to
+ /// Temporary directory for archive extraction
/// True to enable external scanning of archives, false otherwise
/// Integer representing the archive handling level for 7z
/// True if files should be output to folder, false otherwise
@@ -380,7 +380,7 @@ namespace SabreTools
/// Integer representing the archive handling level for Zip
/// True if the updated DAT should be output, false otherwise
/// Logger object for file and console output
- private static void InitSortVerify(List datfiles, List inputs, string outdir, string tempdir, bool quickScan,
+ private static void InitSortVerify(List datfiles, List inputs, string outDir, string tempDir, bool quickScan,
bool toFolder, bool verify, bool delete, bool? torrentX, bool romba, int sevenzip, int gz, int rar, int zip, bool updateDat, Logger logger)
{
// Add all of the input DATs into one huge internal DAT
@@ -390,7 +390,7 @@ namespace SabreTools
datdata = DatTools.Parse(datfile, 99, 99, datdata, logger);
}
- SimpleSort ss = new SimpleSort(datdata, inputs, outdir, tempdir, quickScan, toFolder, verify,
+ SimpleSort ss = new SimpleSort(datdata, inputs, outDir, tempDir, quickScan, toFolder, verify,
delete, torrentX, romba, sevenzip, gz, rar, zip, updateDat, logger);
ss.StartProcessing();
}
@@ -430,21 +430,21 @@ namespace SabreTools
/// Wrap splitting a DAT by item type
///
/// List of inputs to be used
- /// Output directory for the split files
- private static void InitTypeSplit(List inputs, string outdir)
+ /// Output directory for the split files
+ private static void InitTypeSplit(List inputs, string outDir)
{
// Loop over the input files
foreach (string input in inputs)
{
if (File.Exists(input))
{
- DatTools.SplitByType(Path.GetFullPath(input), outdir, Path.GetFullPath(Path.GetDirectoryName(input)), _logger);
+ DatTools.SplitByType(Path.GetFullPath(input), outDir, Path.GetFullPath(Path.GetDirectoryName(input)), _logger);
}
else if (Directory.Exists(input))
{
foreach (string file in Directory.EnumerateFiles(input, "*", SearchOption.AllDirectories))
{
- DatTools.SplitByType(file, outdir, Path.GetFullPath((input.EndsWith(Path.DirectorySeparatorChar.ToString()) ? input : input + Path.DirectorySeparatorChar)), _logger);
+ DatTools.SplitByType(file, outDir, Path.GetFullPath((input.EndsWith(Path.DirectorySeparatorChar.ToString()) ? input : input + Path.DirectorySeparatorChar)), _logger);
}
}
else
@@ -514,7 +514,7 @@ namespace SabreTools
/// True if all games should be replaced by '!', false otherwise
/// String representing root directory to compare against for length calculation
/// /* Output DAT info */
- /// Optional param for output directory
+ /// Optional param for output directory
/// True to clean the game names to WoD standard, false otherwise (default)
/// True to allow SL DATs to have game names used instead of descriptions, false otherwise (default)
/// True to dedupe the roms in the DAT, false otherwise (default)
@@ -579,7 +579,7 @@ namespace SabreTools
string root,
/* Output DAT info */
- string outdir,
+ string outDir,
bool clean,
bool softlist,
bool dedup,
@@ -705,7 +705,7 @@ namespace SabreTools
XSV = tsv,
};
- DatTools.Update(inputs, userInputDat, outputFormat, outdir, merge, diffMode, cascade, inplace, skip, bare, clean, softlist,
+ DatTools.Update(inputs, userInputDat, outputFormat, outDir, merge, diffMode, cascade, inplace, skip, bare, clean, softlist,
gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, trim, single, root, maxDegreeOfParallelism, _logger);
}
diff --git a/SabreTools/Partials/SabreTools_Menus.cs b/SabreTools/Partials/SabreTools_Menus.cs
index d704f90b..3c151f15 100644
--- a/SabreTools/Partials/SabreTools_Menus.cs
+++ b/SabreTools/Partials/SabreTools_Menus.cs
@@ -240,7 +240,7 @@ Make a selection:
///
private static void ConvertMenu()
{
- string selection = "", input = "", outdir = "";
+ string selection = "", input = "", outDir = "";
OutputFormat outputFormat = OutputFormat.Xml;
while (selection.ToLowerInvariant() != "b")
{
@@ -251,7 +251,7 @@ Make a selection:
Make a selection:
1) File or folder to convert" + (input == "" ? "" : ":\n" + input) + @"
- 2) New output folder" + (outdir == "" ? " (blank means source directory)" : ":\n" + outdir) + @"
+ 2) New output folder" + (outDir == "" ? " (blank means source directory)" : ":\n" + outDir) + @"
3) Current output type: " + (outputFormat.ToString()) + @"
4) Process file or folder
B) Go back to the previous menu
@@ -268,7 +268,7 @@ Make a selection:
case "2":
Console.Clear();
Console.Write("Please enter a folder name: ");
- outdir = Console.ReadLine();
+ outDir = Console.ReadLine();
break;
case "3":
string subsel = "";
@@ -312,11 +312,11 @@ Make a selection:
InitUpdate(temp, "", "", "", "", "", "", "", "", "", "", "", "", false, "", "", "",
(outputFormat == OutputFormat.ClrMamePro), (outputFormat == OutputFormat.MissFile), (outputFormat == OutputFormat.RomCenter),
(outputFormat == OutputFormat.SabreDat), (outputFormat == OutputFormat.Xml), false, "", "", false, "", "", false, false, false,
- false, false, false, false, false, "", "", "", -1, -1, -1, "", "", "", null, outdir, false, false);
+ false, false, false, false, false, "", "", "", -1, -1, -1, "", "", "", null, outDir, false, false);
*/
Console.Write("\nPress any key to continue...");
Console.ReadKey();
- input = ""; outdir = "";
+ input = ""; outDir = "";
outputFormat = OutputFormat.Xml;
break;
}
@@ -579,7 +579,7 @@ Make a selection:
///
private static void ExtSplitMenu()
{
- string selection = "", input = "", exta = "", extb = "", outdir = "";
+ string selection = "", input = "", exta = "", extb = "", outDir = "";
while (selection.ToLowerInvariant() != "b")
{
Console.Clear();
@@ -591,7 +591,7 @@ Make a selection:
1) File to split" + (input != "" ? ":\n\t" + input : "") + @"
2) First file extension" + (exta != "" ? ":\t" + exta : "") + @"
3) Second file extension" + (extb != "" ? ":\t" + extb : "") + @"
- 4) Output directory" + (outdir != "" ? ":\n\t" + outdir : "") + @"
+ 4) Output directory" + (outDir != "" ? ":\n\t" + outDir : "") + @"
5) Split the file
B) Go back to the previous menu
");
@@ -617,16 +617,16 @@ Make a selection:
case "4":
Console.Clear();
Console.Write("Please enter the output directory: ");
- outdir = Console.ReadLine();
+ outDir = Console.ReadLine();
break;
case "5":
Console.Clear();
List inputs = new List();
inputs.Add(input);
- InitExtSplit(inputs, exta, extb, outdir);
+ InitExtSplit(inputs, exta, extb, outDir);
Console.Write("\nPress any key to continue...");
Console.ReadKey();
- input = ""; exta = ""; extb = ""; outdir = "";
+ input = ""; exta = ""; extb = ""; outDir = "";
break;
}
}
@@ -637,7 +637,7 @@ Make a selection:
///
private static void HashSplitMenu()
{
- string selection = "", input = "", outdir = "";
+ string selection = "", input = "", outDir = "";
while (selection.ToLowerInvariant() != "b")
{
Console.Clear();
@@ -647,7 +647,7 @@ Make a selection:
Make a selection:
1) File or folder to split" + (input != "" ? ":\n\t" + input : "") + @"
- 2) Output directory" + (outdir != "" ? ":\n\t" + outdir : "") + @"
+ 2) Output directory" + (outDir != "" ? ":\n\t" + outDir : "") + @"
3) Split the file
B) Go back to the previous menu
");
@@ -663,16 +663,16 @@ Make a selection:
case "2":
Console.Clear();
Console.Write("Please enter the output directory: ");
- outdir = Console.ReadLine();
+ outDir = Console.ReadLine();
break;
case "3":
Console.Clear();
List inputs = new List();
inputs.Add(input);
- InitHashSplit(inputs, outdir);
+ InitHashSplit(inputs, outDir);
Console.Write("\nPress any key to continue...");
Console.ReadKey();
- input = ""; outdir = "";
+ input = ""; outDir = "";
break;
}
}
diff --git a/SabreTools/SabreTools.cs b/SabreTools/SabreTools.cs
index ffe138ce..0f9c1c67 100644
--- a/SabreTools/SabreTools.cs
+++ b/SabreTools/SabreTools.cs
@@ -148,7 +148,7 @@ namespace SabreTools
name = "",
manu = "",
md5 = "",
- outdir = "",
+ outDir = "",
postfix = "",
prefix = "",
repext = "",
@@ -159,7 +159,7 @@ namespace SabreTools
sha1 = "",
sources = "",
systems = "",
- tempdir = "",
+ tempDir = "",
url = "",
version = "";
List inputs = new List();
@@ -531,7 +531,7 @@ namespace SabreTools
}
else if (temparg.StartsWith("-out=") || temparg.StartsWith("--out="))
{
- outdir = temparg.Split('=')[1];
+ outDir = temparg.Split('=')[1];
}
else if (temparg.StartsWith("-post=") || temparg.StartsWith("--postfix="))
{
@@ -587,7 +587,7 @@ namespace SabreTools
}
else if (temparg.StartsWith("-t=") || temparg.StartsWith("--temp="))
{
- tempdir = temparg.Split('=')[1];
+ tempDir = temparg.Split('=')[1];
}
else if (temparg.StartsWith("-u=") || temparg.StartsWith("--url="))
{
@@ -670,13 +670,13 @@ namespace SabreTools
else if (datfromdir)
{
InitDatFromDir(inputs, filename, name, description, category, version, author, forceunpack, outputFormat,
- romba, superdat, noMD5, noSHA1, bare, archivesAsFiles, enableGzip, addBlanks, addDate, tempdir, maxParallelism);
+ romba, superdat, noMD5, noSHA1, bare, archivesAsFiles, enableGzip, addBlanks, addDate, tempDir, maxParallelism);
}
// Split a DAT by extension
else if (extsplit)
{
- InitExtSplit(inputs, exta, extb, outdir);
+ InitExtSplit(inputs, exta, extb, outDir);
}
// Generate all DATs
@@ -696,13 +696,13 @@ namespace SabreTools
// Split a DAT by available hashes
else if (hashsplit)
{
- InitHashSplit(inputs, outdir);
+ InitHashSplit(inputs, outDir);
}
// If we're in headerer mode
else if (headerer)
{
- InitHeaderer(inputs, restore, outdir, _logger);
+ InitHeaderer(inputs, restore, outDir, _logger);
}
// Import a file or folder
@@ -749,7 +749,7 @@ namespace SabreTools
// Split a DAT by item type
else if (typesplit)
{
- InitTypeSplit(inputs, outdir);
+ InitTypeSplit(inputs, outDir);
}
// Convert, update, merge, diff, and filter a DAT or folder of DATs
@@ -758,7 +758,7 @@ namespace SabreTools
InitUpdate(inputs, filename, name, description, rootdir, category, version, date, author, email, homepage, url, comment, header,
superdat, forcemerge, forcend, forcepack, outputFormat, usegame, prefix,
postfix, quotes, repext, addext, remext, datprefix, romba, tsv, merge, diffMode, cascade, inplace, skip, bare, gamename, romname,
- romtype, sgt, slt, seq, crc, md5, sha1, nodump, trim, single, root, outdir, clean, softlist, dedup, maxParallelism);
+ romtype, sgt, slt, seq, crc, md5, sha1, nodump, trim, single, root, outDir, clean, softlist, dedup, maxParallelism);
}
// If nothing is set, show the help
diff --git a/SimpleSort/SimpleSortApp.cs b/SimpleSort/SimpleSortApp.cs
index abcc08b6..5957466f 100644
--- a/SimpleSort/SimpleSortApp.cs
+++ b/SimpleSort/SimpleSortApp.cs
@@ -57,8 +57,8 @@ namespace SabreTools
gz = 2,
rar = 2,
zip = 0;
- string outdir = "",
- tempdir = "";
+ string outDir = "",
+ tempDir = "";
List inputs = new List();
List datfiles = new List();
@@ -140,7 +140,7 @@ namespace SabreTools
}
else if (temparg.StartsWith("-out=") || temparg.StartsWith("--out="))
{
- outdir = temparg.Split('=')[1];
+ outDir = temparg.Split('=')[1];
}
else if (temparg.StartsWith("-rar=") || temparg.StartsWith("--rar="))
{
@@ -151,7 +151,7 @@ namespace SabreTools
}
else if (temparg.StartsWith("-t=") || temparg.StartsWith("--temp="))
{
- tempdir = temparg.Split('=')[1];
+ tempDir = temparg.Split('=')[1];
}
else if (temparg.StartsWith("-zip=") || temparg.StartsWith("--zip="))
{
@@ -198,7 +198,7 @@ namespace SabreTools
// If we are converting the folder to TGZ
else if (convert)
{
- InitConvertFolderTGZ(inputs, outdir, tempdir, delete, romba, sevenzip, gz, rar, zip, logger);
+ InitConvertFolderTGZ(inputs, outDir, tempDir, delete, romba, sevenzip, gz, rar, zip, logger);
}
// If we are doing a simple sort
@@ -206,7 +206,7 @@ namespace SabreTools
{
if (datfiles.Count > 0)
{
- InitSortVerify(datfiles, inputs, outdir, tempdir, quickScan, toFolder,
+ InitSortVerify(datfiles, inputs, outDir, tempDir, quickScan, toFolder,
verify, delete, torrentX, romba, sevenzip, gz, rar, zip, updateDat, logger);
}
else
@@ -233,8 +233,8 @@ namespace SabreTools
///
/// Names of the DATs to compare against
/// List of input files/folders to check
- /// Output directory to use to build to
- /// Temporary directory for archive extraction
+ /// Output directory to use to build to
+ /// Temporary directory for archive extraction
/// True to enable external scanning of archives, false otherwise
/// Integer representing the archive handling level for 7z
/// True if files should be output to folder, false otherwise
@@ -247,7 +247,7 @@ namespace SabreTools
/// Integer representing the archive handling level for Zip
/// True if the updated DAT should be output, false otherwise
/// Logger object for file and console output
- private static void InitSortVerify(List datfiles, List inputs, string outdir, string tempdir, bool quickScan,
+ private static void InitSortVerify(List datfiles, List inputs, string outDir, string tempDir, bool quickScan,
bool toFolder, bool verify, bool delete, bool? torrentX, bool romba, int sevenzip, int gz, int rar, int zip, bool updateDat, Logger logger)
{
// Add all of the input DATs into one huge internal DAT
@@ -257,7 +257,7 @@ namespace SabreTools
datdata = DatTools.Parse(datfile, 99, 99, datdata, logger, keep: true, softlist: true);
}
- SimpleSort ss = new SimpleSort(datdata, inputs, outdir, tempdir, quickScan, toFolder, verify,
+ SimpleSort ss = new SimpleSort(datdata, inputs, outDir, tempDir, quickScan, toFolder, verify,
delete, torrentX, romba, sevenzip, gz, rar, zip, updateDat, logger);
ss.StartProcessing();
}
@@ -266,8 +266,8 @@ namespace SabreTools
/// Wrap sorting files using an input DAT
///
/// List of all inputted files and folders
- /// Output directory (empty for default directory)
- /// Temporary directory for archive extraction
+ /// Output directory (empty for default directory)
+ /// Temporary directory for archive extraction
/// True if input files should be deleted, false otherwise
/// True if files should be output in Romba depot folders, false otherwise
/// Integer representing the archive handling level for 7z
@@ -275,7 +275,7 @@ namespace SabreTools
/// Integer representing the archive handling level for RAR
/// Integer representing the archive handling level for Zip
/// Logger object for file and console output
- public static bool InitConvertFolderTGZ(List inputs, string outdir, string tempdir, bool delete,
+ public static bool InitConvertFolderTGZ(List inputs, string outDir, string tempDir, bool delete,
bool romba, int sevenzip, int gz, int rar, int zip, Logger logger)
{
// Get all individual files from the inputs
@@ -295,7 +295,7 @@ namespace SabreTools
}
}
- SimpleSort ss = new SimpleSort(new Dat(), newinputs, outdir, tempdir, false, false, false,
+ SimpleSort ss = new SimpleSort(new Dat(), newinputs, outDir, tempDir, false, false, false,
delete, false, romba, sevenzip, gz, rar, zip, false, logger);
return ss.Convert();
}