mirror of
https://github.com/SabreTools/SabreTools.Hashing.git
synced 2026-09-25 00:05:05 +00:00
Replace FileInfo calls
This commit is contained in:
@@ -166,14 +166,11 @@ namespace SabreTools.Hashing
|
||||
return null;
|
||||
}
|
||||
|
||||
// Set the file size
|
||||
size = new FileInfo(filename).Length;
|
||||
|
||||
// Open the input file
|
||||
var input = File.OpenRead(filename);
|
||||
|
||||
// Return the hashes from the stream
|
||||
return GetStreamHashes(input, hashTypes);
|
||||
return GetStreamHashesAndSize(input, hashTypes, out size);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -191,14 +188,11 @@ namespace SabreTools.Hashing
|
||||
return null;
|
||||
}
|
||||
|
||||
// Set the file size
|
||||
size = new FileInfo(filename).Length;
|
||||
|
||||
// Open the input file
|
||||
var input = File.OpenRead(filename);
|
||||
|
||||
// Return the hashes from the stream
|
||||
return GetStreamHashArrays(input, hashTypes);
|
||||
return GetStreamHashArraysAndSize(input, hashTypes, out size);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user