[DatFile] More instance methods, MORE!

This commit is contained in:
Matt Nadareski
2016-09-22 18:15:02 -07:00
parent a8417bdfcc
commit 356032f561
4 changed files with 694 additions and 662 deletions

View File

@@ -63,7 +63,7 @@ namespace SabreTools
Name = Path.GetFileName(inputs[0]) + " Dir2Dat",
Description = Path.GetFileName(inputs[0]) + " Dir2Dat",
OutputFormat = OutputFormat.Xml,
Files = new Dictionary<string, List<DatItem>>(),
Files = new SortedDictionary<string, List<DatItem>>(),
};
Logger logger = new Logger(false, "");

File diff suppressed because it is too large Load Diff

View File

@@ -76,7 +76,7 @@ namespace SabreTools.Helper
_cursorLeft = Console.CursorLeft;
_matched = new DatFile
{
Files = new Dictionary<string, List<DatItem>>(),
Files = new SortedDictionary<string, List<DatItem>>(),
};
}
@@ -143,7 +143,7 @@ namespace SabreTools.Helper
// Setup the fixdat
_matched = (DatFile)_datdata.CloneHeader();
_matched.Files = new Dictionary<string, List<DatItem>>();
_matched.Files = new SortedDictionary<string, List<DatItem>>();
_matched.FileName = "fixDat_" + _matched.FileName;
_matched.Name = "fixDat_" + _matched.Name;
_matched.Description = "fixDat_" + _matched.Description;
@@ -341,7 +341,7 @@ namespace SabreTools.Helper
_logger.User("Getting source file information...");
DatFile matchdat = new DatFile
{
Files = new Dictionary<string, List<DatItem>>(),
Files = new SortedDictionary<string, List<DatItem>>(),
};
foreach (string file in files)
{
@@ -427,7 +427,7 @@ namespace SabreTools.Helper
}
// Then bucket the keys by game for better output
SortedDictionary<string, List<DatItem>> keysByGame = DatFile.BucketByGame(toFromMap.Keys.ToList(), false, true, _logger);
SortedDictionary<string, List<DatItem>> keysByGame = DatFile.BucketListByGame(toFromMap.Keys.ToList(), false, true, _logger);
#endregion

View File

@@ -108,7 +108,7 @@ namespace SabreTools
OutputFormat = (outputFormat == 0 ? OutputFormat.Xml : outputFormat),
Romba = romba,
Type = (superdat ? "SuperDAT" : ""),
Files = new Dictionary<string, List<DatItem>>(),
Files = new SortedDictionary<string, List<DatItem>>(),
};
// For each input directory, create a DAT
@@ -118,7 +118,7 @@ namespace SabreTools
{
// Clone the base Dat for information
DatFile datdata = (DatFile)basedat.Clone();
datdata.Files = new Dictionary<string, List<DatItem>>();
datdata.Files = new SortedDictionary<string, List<DatItem>>();
string basePath = Path.GetFullPath(path);
bool success = datdata.PopulateDatFromDir(basePath, noMD5, noSHA1, bare, archivesAsFiles, enableGzip, addBlanks, addDate, tempDir, copyFiles, maxDegreeOfParallelism, _logger);
@@ -569,7 +569,7 @@ namespace SabreTools
XSV = tsv,
};
DatFile.Update(inputs, userInputDat, outputFormat, outDir, merge, diffMode, cascade, inplace, skip, bare, clean, softlist,
userInputDat.Update(inputs, outDir, merge, diffMode, cascade, inplace, skip, bare, clean, softlist,
gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, itemStatus, trim, single, root, maxDegreeOfParallelism, _logger);
}