mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-02-04 05:35:49 +00:00
Remove extractable interfaces to avoid conflicts
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
using System.IO;
|
||||
|
||||
namespace BinaryObjectScanner.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Mark a file type as being able to be extracted
|
||||
/// </summary>
|
||||
public interface IExtractable
|
||||
{
|
||||
/// <summary>
|
||||
/// Extract a file to a temporary path, if possible
|
||||
/// </summary>
|
||||
/// <param name="file">Path to the input file</param>
|
||||
/// <param name="outDir">Path to the output directory</param>
|
||||
/// <param name="includeDebug">True to include debug data, false otherwise</param>
|
||||
/// <returns>Indicates if the extractable was successfully extracted</returns>
|
||||
/// <remarks>Ideally, this should just point to the other extract implementation.</remarks>
|
||||
bool Extract(string file, string outDir, bool includeDebug);
|
||||
|
||||
/// <summary>
|
||||
/// Extract a stream to a temporary path, if possible
|
||||
/// </summary>
|
||||
/// <param name="stream">Stream representing the input file</param>
|
||||
/// <param name="file">Path to the input file</param>
|
||||
/// <param name="outDir">Path to the output directory</param>
|
||||
/// <param name="includeDebug">True to include debug data, false otherwise</param>
|
||||
/// <returns>Indicates if the extractable was successfully extracted</returns>
|
||||
bool Extract(Stream? stream, string file, string outDir, bool includeDebug);
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using SabreTools.Serialization.Interfaces;
|
||||
|
||||
namespace BinaryObjectScanner.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Mark a file type as being able to be extracted
|
||||
/// </summary>
|
||||
public interface IExtractable<T> : IExtractable where T : IWrapper { }
|
||||
}
|
||||
@@ -4,6 +4,7 @@ using System.IO;
|
||||
using BinaryObjectScanner.Data;
|
||||
using BinaryObjectScanner.Interfaces;
|
||||
using SabreTools.IO.Extensions;
|
||||
using SabreTools.Serialization.Interfaces;
|
||||
using SabreTools.Serialization.Wrappers;
|
||||
|
||||
namespace BinaryObjectScanner
|
||||
@@ -287,7 +288,7 @@ namespace BinaryObjectScanner
|
||||
#region Archive File Types
|
||||
|
||||
// If we're scanning archives
|
||||
if (wrapper is SabreTools.Serialization.Interfaces.IExtractable extractable && _options.ScanArchives)
|
||||
if (wrapper is IExtractable extractable && _options.ScanArchives)
|
||||
{
|
||||
// If the extractable file itself fails
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user