[Structs] Rename File to Rom again

I'm reverting this because there might be cases where System.IO.File and SabreTools.Helper.File could be in conflict
This commit is contained in:
Matt Nadareski
2016-08-29 13:57:46 -07:00
parent 3f463a1cf5
commit b9abd54944
13 changed files with 210 additions and 210 deletions

View File

@@ -32,7 +32,7 @@ namespace SabreTools.Helper
}
// Bucket roms by game name and optionally dedupe
SortedDictionary<string, List<File>> sortable = DatTools.BucketByGame(datdata.Files, datdata.MergeRoms, norename, logger);
SortedDictionary<string, List<Rom>> sortable = DatTools.BucketByGame(datdata.Files, datdata.MergeRoms, norename, logger);
// Now write out to file
// If it's empty, use the current folder
@@ -95,11 +95,11 @@ namespace SabreTools.Helper
int depth = 2, last = -1;
string lastgame = null;
List<string> splitpath = new List<string>();
foreach (List<File> roms in sortable.Values)
foreach (List<Rom> roms in sortable.Values)
{
for (int index = 0; index < roms.Count; index++)
{
File rom = roms[index];
Rom rom = roms[index];
List<string> newsplit = rom.Machine.Name.Split('\\').ToList();
// If we have a different game and we're not at the start of the list, output the end of last item
@@ -285,7 +285,7 @@ namespace SabreTools.Helper
/// <param name="last">Last known depth to cycle back from (SabreDAT only)</param>
/// <param name="logger">Logger object for file and console output</param>
/// <returns>The new depth of the tag</returns>
public static int WriteStartGame(StreamWriter sw, File rom, List<string> newsplit, string lastgame, Dat datdata, int depth, int last, Logger logger)
public static int WriteStartGame(StreamWriter sw, Rom rom, List<string> newsplit, string lastgame, Dat datdata, int depth, int last, Logger logger)
{
try
{
@@ -344,7 +344,7 @@ namespace SabreTools.Helper
/// <param name="last">Last known depth to cycle back from (SabreDAT only)</param>
/// <param name="logger">Logger object for file and console output</param>
/// <returns>The new depth of the tag</returns>
public static int WriteEndGame(StreamWriter sw, File rom, List<string> splitpath, List<string> newsplit, string lastgame, Dat datdata, int depth, out int last, Logger logger)
public static int WriteEndGame(StreamWriter sw, Rom rom, List<string> splitpath, List<string> newsplit, string lastgame, Dat datdata, int depth, out int last, Logger logger)
{
last = 0;
@@ -413,7 +413,7 @@ namespace SabreTools.Helper
/// <param name="depth">Current depth to output file at (SabreDAT only)</param>
/// <param name="logger">Logger object for file and console output</param>
/// <returns>True if the data was written, false on error</returns>
public static bool WriteRomData(StreamWriter sw, File rom, string lastgame, Dat datdata, int depth, Logger logger)
public static bool WriteRomData(StreamWriter sw, Rom rom, string lastgame, Dat datdata, int depth, Logger logger)
{
try
{