mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Fix ambiguous references
This commit is contained in:
@@ -465,8 +465,8 @@ Possible values are: Verbose, User, Warning, Error");
|
||||
public void EnsureDatabase(string db, string connectionString)
|
||||
{
|
||||
// Make sure the file exists
|
||||
if (!File.Exists(db))
|
||||
File.Create(db);
|
||||
if (!System.IO.File.Exists(db))
|
||||
System.IO.File.Create(db);
|
||||
|
||||
// Open the database connection
|
||||
SqliteConnection dbc = new SqliteConnection(connectionString);
|
||||
@@ -734,16 +734,16 @@ CREATE TABLE IF NOT EXISTS dat (
|
||||
if (!Directory.Exists(key))
|
||||
{
|
||||
Directory.CreateDirectory(key);
|
||||
File.CreateText(Path.Combine(key, ".romba_size"));
|
||||
File.CreateText(Path.Combine(key, ".romba_size.backup"));
|
||||
System.IO.File.CreateText(Path.Combine(key, ".romba_size"));
|
||||
System.IO.File.CreateText(Path.Combine(key, ".romba_size.backup"));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!File.Exists(Path.Combine(key, ".romba_size")))
|
||||
File.CreateText(Path.Combine(key, ".romba_size"));
|
||||
if (!System.IO.File.Exists(Path.Combine(key, ".romba_size")))
|
||||
System.IO.File.CreateText(Path.Combine(key, ".romba_size"));
|
||||
|
||||
if (!File.Exists(Path.Combine(key, ".romba_size.backup")))
|
||||
File.CreateText(Path.Combine(key, ".romba_size.backup"));
|
||||
if (!System.IO.File.Exists(Path.Combine(key, ".romba_size.backup")))
|
||||
System.IO.File.CreateText(Path.Combine(key, ".romba_size.backup"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ contents of any changed dats.";
|
||||
}
|
||||
|
||||
// Make sure the file exists
|
||||
if (!File.Exists(_db))
|
||||
if (!System.IO.File.Exists(_db))
|
||||
EnsureDatabase(_db, _connectionString);
|
||||
|
||||
// Make sure the dats dir is set
|
||||
|
||||
@@ -278,7 +278,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
try
|
||||
{
|
||||
logger.User($"Writing to '{outfile}'...");
|
||||
FileStream fs = File.Create(outfile);
|
||||
FileStream fs = System.IO.File.Create(outfile);
|
||||
|
||||
// If we get back null for some reason, just log and return
|
||||
if (fs == null)
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
{
|
||||
// Open a file reader
|
||||
Encoding enc = filename.GetEncoding();
|
||||
SeparatedValueReader svr = new SeparatedValueReader(File.OpenRead(filename), enc)
|
||||
SeparatedValueReader svr = new SeparatedValueReader(System.IO.File.OpenRead(filename), enc)
|
||||
{
|
||||
Header = true,
|
||||
Quotes = false,
|
||||
@@ -125,7 +125,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
try
|
||||
{
|
||||
logger.User($"Writing to '{outfile}'...");
|
||||
FileStream fs = File.Create(outfile);
|
||||
FileStream fs = System.IO.File.Create(outfile);
|
||||
|
||||
// If we get back null for some reason, just log and return
|
||||
if (fs == null)
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
{
|
||||
// Open a file reader
|
||||
Encoding enc = filename.GetEncoding();
|
||||
ClrMameProReader cmpr = new ClrMameProReader(File.OpenRead(filename), enc)
|
||||
ClrMameProReader cmpr = new ClrMameProReader(System.IO.File.OpenRead(filename), enc)
|
||||
{
|
||||
DosCenter = false,
|
||||
Quotes = Quotes,
|
||||
@@ -446,7 +446,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
try
|
||||
{
|
||||
logger.User($"Writing to '{outfile}'...");
|
||||
FileStream fs = File.Create(outfile);
|
||||
FileStream fs = System.IO.File.Create(outfile);
|
||||
|
||||
// If we get back null for some reason, just log and return
|
||||
if (fs == null)
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
{
|
||||
// Open a file reader
|
||||
Encoding enc = filename.GetEncoding();
|
||||
ClrMameProReader cmpr = new ClrMameProReader(File.OpenRead(filename), enc)
|
||||
ClrMameProReader cmpr = new ClrMameProReader(System.IO.File.OpenRead(filename), enc)
|
||||
{
|
||||
DosCenter = true
|
||||
};
|
||||
@@ -271,7 +271,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
try
|
||||
{
|
||||
logger.User($"Writing to '{outfile}'...");
|
||||
FileStream fs = File.Create(outfile);
|
||||
FileStream fs = System.IO.File.Create(outfile);
|
||||
|
||||
// If we get back null for some reason, just log and return
|
||||
if (fs == null)
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
{
|
||||
// Open a file reader
|
||||
Encoding enc = filename.GetEncoding();
|
||||
SeparatedValueReader svr = new SeparatedValueReader(File.OpenRead(filename), enc)
|
||||
SeparatedValueReader svr = new SeparatedValueReader(System.IO.File.OpenRead(filename), enc)
|
||||
{
|
||||
Header = false,
|
||||
Quotes = false,
|
||||
@@ -122,7 +122,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
try
|
||||
{
|
||||
logger.User($"Writing to '{outfile}'...");
|
||||
FileStream fs = File.Create(outfile);
|
||||
FileStream fs = System.IO.File.Create(outfile);
|
||||
|
||||
// If we get back null for some reason, just log and return
|
||||
if (fs == null)
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
{
|
||||
// Open a file reader
|
||||
Encoding enc = filename.GetEncoding();
|
||||
StreamReader sr = new StreamReader(File.OpenRead(filename), enc);
|
||||
StreamReader sr = new StreamReader(System.IO.File.OpenRead(filename), enc);
|
||||
|
||||
while (!sr.EndOfStream)
|
||||
{
|
||||
@@ -250,7 +250,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
try
|
||||
{
|
||||
logger.User($"Writing to '{outfile}'...");
|
||||
FileStream fs = File.Create(outfile);
|
||||
FileStream fs = System.IO.File.Create(outfile);
|
||||
|
||||
// If we get back null for some reason, just log and return
|
||||
if (fs == null)
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
{
|
||||
// Open a file reader
|
||||
Encoding enc = filename.GetEncoding();
|
||||
StreamReader sr = new StreamReader(File.OpenRead(filename), enc);
|
||||
StreamReader sr = new StreamReader(System.IO.File.OpenRead(filename), enc);
|
||||
|
||||
string gamename = string.Empty;
|
||||
while (!sr.EndOfStream)
|
||||
@@ -278,7 +278,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
try
|
||||
{
|
||||
logger.User($"Writing to '{outfile}'...");
|
||||
FileStream fs = File.Create(outfile);
|
||||
FileStream fs = System.IO.File.Create(outfile);
|
||||
|
||||
// If we get back null for some reason, just log and return
|
||||
if (fs == null)
|
||||
|
||||
@@ -1361,7 +1361,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
try
|
||||
{
|
||||
logger.User($"Writing to '{outfile}'...");
|
||||
FileStream fs = File.Create(outfile);
|
||||
FileStream fs = System.IO.File.Create(outfile);
|
||||
|
||||
// If we get back null for some reason, just log and return
|
||||
if (fs == null)
|
||||
|
||||
@@ -860,7 +860,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
try
|
||||
{
|
||||
logger.User($"Writing to '{outfile}'...");
|
||||
FileStream fs = File.Create(outfile);
|
||||
FileStream fs = System.IO.File.Create(outfile);
|
||||
|
||||
// If we get back null for some reason, just log and return
|
||||
if (fs == null)
|
||||
|
||||
@@ -674,7 +674,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
try
|
||||
{
|
||||
logger.User($"Writing to '{outfile}'...");
|
||||
FileStream fs = File.Create(outfile);
|
||||
FileStream fs = System.IO.File.Create(outfile);
|
||||
|
||||
// If we get back null for some reason, just log and return
|
||||
if (fs == null)
|
||||
|
||||
@@ -547,7 +547,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
try
|
||||
{
|
||||
logger.User($"Writing to '{outfile}'...");
|
||||
FileStream fs = File.Create(outfile);
|
||||
FileStream fs = System.IO.File.Create(outfile);
|
||||
|
||||
// If we get back null for some reason, just log and return
|
||||
if (fs == null)
|
||||
|
||||
@@ -376,7 +376,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
try
|
||||
{
|
||||
logger.User($"Writing to '{outfile}'...");
|
||||
FileStream fs = File.Create(outfile);
|
||||
FileStream fs = System.IO.File.Create(outfile);
|
||||
|
||||
// If we get back null for some reason, just log and return
|
||||
if (fs == null)
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
public override void ParseFile(string filename, int indexId, bool keep, bool statsOnly = false, bool throwOnError = false)
|
||||
{
|
||||
// Prepare all internal variables
|
||||
StreamReader sr = new StreamReader(File.OpenRead(filename), new UTF8Encoding(false));
|
||||
StreamReader sr = new StreamReader(System.IO.File.OpenRead(filename), new UTF8Encoding(false));
|
||||
JsonTextReader jtr = new JsonTextReader(sr);
|
||||
|
||||
// If we got a null reader, just return
|
||||
@@ -337,7 +337,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
try
|
||||
{
|
||||
logger.User($"Writing to '{outfile}'...");
|
||||
FileStream fs = File.Create(outfile);
|
||||
FileStream fs = System.IO.File.Create(outfile);
|
||||
|
||||
// If we get back null for some reason, just log and return
|
||||
if (fs == null)
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
{
|
||||
// Open a file reader
|
||||
Encoding enc = filename.GetEncoding();
|
||||
SeparatedValueReader svr = new SeparatedValueReader(File.OpenRead(filename), enc)
|
||||
SeparatedValueReader svr = new SeparatedValueReader(System.IO.File.OpenRead(filename), enc)
|
||||
{
|
||||
Header = true,
|
||||
Quotes = true,
|
||||
@@ -108,7 +108,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
try
|
||||
{
|
||||
logger.User($"Writing to '{outfile}'...");
|
||||
FileStream fs = File.Create(outfile);
|
||||
FileStream fs = System.IO.File.Create(outfile);
|
||||
|
||||
// If we get back null for some reason, just log and return
|
||||
if (fs == null)
|
||||
|
||||
@@ -696,7 +696,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
try
|
||||
{
|
||||
logger.User($"Writing to '{outfile}'...");
|
||||
FileStream fs = File.Create(outfile);
|
||||
FileStream fs = System.IO.File.Create(outfile);
|
||||
|
||||
// If we get back null for some reason, just log and return
|
||||
if (fs == null)
|
||||
|
||||
@@ -1099,8 +1099,8 @@ namespace SabreTools.DatFiles
|
||||
protected void EnsureDatabase()
|
||||
{
|
||||
// Make sure the file exists
|
||||
if (!File.Exists(ItemDictionaryFileName))
|
||||
File.Create(ItemDictionaryFileName);
|
||||
if (!System.IO.File.Exists(ItemDictionaryFileName))
|
||||
System.IO.File.Create(ItemDictionaryFileName);
|
||||
|
||||
// If we have no database connection, we can't do anything
|
||||
if (dbc == null)
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace SabreTools.DatTools
|
||||
if (addBlanks)
|
||||
ProcessDirectoryBlanks(datFile, basePath);
|
||||
}
|
||||
else if (File.Exists(basePath))
|
||||
else if (System.IO.File.Exists(basePath))
|
||||
{
|
||||
logger.Verbose($"File found: {basePath}");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user