[Structs] Rename Rom to File

This commit is contained in:
Matt Nadareski
2016-08-29 13:51:45 -07:00
parent 638ba055eb
commit 4d621debcf
18 changed files with 321 additions and 321 deletions

View File

@@ -92,7 +92,7 @@ namespace SabreTools
flag = false;
break;
default:
if (File.Exists(temparg) || Directory.Exists(temparg))
if (System.IO.File.Exists(temparg) || Directory.Exists(temparg))
{
input = temparg;
}
@@ -164,7 +164,7 @@ namespace SabreTools
if (_flag)
{
// If it's a single file, just check it
if (File.Exists(_input))
if (System.IO.File.Exists(_input))
{
DetectSkipperAndTransform(_input);
}
@@ -183,7 +183,7 @@ namespace SabreTools
else
{
// If it's a single file, just check it
if (File.Exists(_input))
if (System.IO.File.Exists(_input))
{
ReplaceHeader(_input);
}
@@ -224,7 +224,7 @@ namespace SabreTools
// Now take care of the header and new output file
string hstr = string.Empty;
using (BinaryReader br = new BinaryReader(File.OpenRead(file)))
using (BinaryReader br = new BinaryReader(System.IO.File.OpenRead(file)))
{
// Extract the header as a string for the database
byte[] hbin = br.ReadBytes(headerSize);
@@ -248,13 +248,13 @@ namespace SabreTools
Skippers.TransformFile(file, newfile, rule, _logger);
// If the output file doesn't exist, return false
if (!File.Exists(newfile))
if (!System.IO.File.Exists(newfile))
{
return false;
}
// Now add the information to the database if it's not already there
Rom rom = RomTools.GetSingleFileInfo(newfile);
Helper.File rom = RomTools.GetSingleFileInfo(newfile);
AddHeaderToDatabase(hstr, rom.HashData.SHA1, type);
}
@@ -309,7 +309,7 @@ namespace SabreTools
public bool ReplaceHeader(string file)
{
// First, get the SHA-1 hash of the file
Rom rom = RomTools.GetSingleFileInfo(file);
Helper.File rom = RomTools.GetSingleFileInfo(file);
// Then try to pull the corresponding headers from the database
string header = "";