mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-02-13 05:35:24 +00:00
29 lines
1.1 KiB
C#
29 lines
1.1 KiB
C#
using System.IO;
|
|
|
|
namespace BinaryObjectScanner.Interfaces
|
|
{
|
|
/// <summary>
|
|
/// Mark a file type as being able to be detected
|
|
/// </summary>
|
|
public interface IDetectable
|
|
{
|
|
/// <summary>
|
|
/// Check if a file is detected as this file type
|
|
/// </summary>
|
|
/// <param name="file">Path to the input file</param>
|
|
/// <param name="includeDebug">True to include debug data, false otherwise</param>
|
|
/// <returns>Detected file or protection type, null on error</returns>
|
|
/// <remarks>Ideally, this should just point to the other detect implementation.</remarks>
|
|
string Detect(string file, bool includeDebug);
|
|
|
|
/// <summary>
|
|
/// Check if a stream is detected as this file type
|
|
/// </summary>
|
|
/// <param name="stream">Stream representing the input file</param>
|
|
/// <param name="file">Path to the input file</param>
|
|
/// <param name="includeDebug">True to include debug data, false otherwise</param>
|
|
/// <returns>Detected file or protection type, null on error</returns>
|
|
string Detect(Stream stream, string file, bool includeDebug);
|
|
}
|
|
}
|