mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Extract out IO namespace, Part 2
This commit is contained in:
@@ -2779,7 +2779,7 @@ namespace SabreTools.Library.DatFiles
|
||||
if (rule.TransformStream(fileStream, transformStream, keepReadOpen: true, keepWriteOpen: true))
|
||||
{
|
||||
// Get the file informations that we will be using
|
||||
Rom headerless = new Rom(transformStream.GetInfo(keepReadOpen: true));
|
||||
Rom headerless = new Rom(BaseFile.GetInfo(transformStream, keepReadOpen: true));
|
||||
|
||||
// If we have duplicates and we're not filtering
|
||||
if (ShouldRebuild(headerless, transformStream, false, out dupes))
|
||||
@@ -2851,7 +2851,7 @@ namespace SabreTools.Library.DatFiles
|
||||
string machinename = null;
|
||||
|
||||
// Get the item from the current file
|
||||
Rom item = new Rom(stream.GetInfo(keepReadOpen: true));
|
||||
Rom item = new Rom(BaseFile.GetInfo(stream, keepReadOpen: true));
|
||||
item.Machine.Name = Path.GetFileNameWithoutExtension(item.Name);
|
||||
item.Machine.Description = Path.GetFileNameWithoutExtension(item.Name);
|
||||
|
||||
|
||||
@@ -181,34 +181,6 @@ namespace SabreTools.Library.DatFiles
|
||||
SHA512,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Available hashing types
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum Hash
|
||||
{
|
||||
CRC = 1 << 0,
|
||||
MD5 = 1 << 1,
|
||||
#if NET_FRAMEWORK
|
||||
RIPEMD160 = 1 << 2,
|
||||
#endif
|
||||
SHA1 = 1 << 3,
|
||||
SHA256 = 1 << 4,
|
||||
SHA384 = 1 << 5,
|
||||
SHA512 = 1 << 6,
|
||||
SpamSum = 1 << 7,
|
||||
|
||||
// Special combinations
|
||||
Standard = CRC | MD5 | SHA1,
|
||||
#if NET_FRAMEWORK
|
||||
DeepHashes = RIPEMD160 | SHA256 | SHA384 | SHA512 | SpamSum,
|
||||
SecureHashes = MD5 | RIPEMD160 | SHA1 | SHA256 | SHA384 | SHA512 | SpamSum,
|
||||
#else
|
||||
DeepHashes = SHA256 | SHA384 | SHA512 | SpamSum,
|
||||
SecureHashes = MD5 | SHA1 | SHA256 | SHA384 | SHA512 | SpamSum,
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines merging tag handling for DAT output
|
||||
/// </summary>
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
using SabreTools.Data;
|
||||
using SabreTools.IO;
|
||||
using SabreTools.Library.DatItems;
|
||||
using SabreTools.Library.IO;
|
||||
|
||||
Reference in New Issue
Block a user