REFACTOR: Reformat code.

This commit is contained in:
2017-12-19 20:33:03 +00:00
parent 77edc7c91c
commit e6f6ace80b
704 changed files with 82627 additions and 83641 deletions

View File

@@ -46,8 +46,7 @@ namespace DiscImageChef.Core
public void Close()
{
if(dataFs != null)
dataFs.Close();
if(dataFs != null) dataFs.Close();
}
public int Read(byte[] array, int offset, int count)
@@ -91,7 +90,10 @@ namespace DiscImageChef.Core
dataFs.Write(data, offset, count);
}
public long Position { get { return dataFs.Position; }}
public long Position
{
get { return dataFs.Position; }
}
public static void WriteTo(string who, string outputPrefix, string outputSuffix, string what, byte[] data)
{
@@ -99,14 +101,14 @@ namespace DiscImageChef.Core
WriteTo(who, outputPrefix + outputSuffix, data, what);
}
public static void WriteTo(string who, string filename, byte[] data, string whatWriting = null, bool overwrite = false)
public static void WriteTo(string who, string filename, byte[] data, string whatWriting = null,
bool overwrite = false)
{
if(!string.IsNullOrEmpty(filename))
{
if(File.Exists(filename))
{
if(overwrite)
File.Delete(filename);
if(overwrite) File.Delete(filename);
else
{
DicConsole.ErrorWriteLine("Not overwriting file {0}", filename);
@@ -121,11 +123,8 @@ namespace DiscImageChef.Core
outputFs.Write(data, 0, data.Length);
outputFs.Close();
}
catch
{
DicConsole.ErrorWriteLine("Unable to write file {0}", filename);
}
catch { DicConsole.ErrorWriteLine("Unable to write file {0}", filename); }
}
}
}
}
}