Remove extractable interfaces to avoid conflicts

This commit is contained in:
Matt Nadareski
2025-09-06 12:32:21 -04:00
parent 9af64f23a5
commit 8fedbb8f77
3 changed files with 2 additions and 40 deletions

View File

@@ -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);
}
}

View File

@@ -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 { }
}

View File

@@ -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