Files
BinaryObjectScanner/BinaryObjectScanner.Interfaces/IExtractable.cs

31 lines
1.2 KiB
C#
Raw Normal View History

2023-03-09 13:48:51 -05:00
using System.IO;
namespace BinaryObjectScanner.Interfaces
{
/// <summary>
/// Mark a file type as being able to be extracted
/// </summary>
2023-03-21 13:14:42 -04:00
/// TODO: Change to have output directory passed in
/// TODO: Change to return a bool
2023-03-09 13:48:51 -05:00
public interface IExtractable
{
/// <summary>
2023-03-13 15:34:26 -04:00
/// Extract a file to a temporary path, if possible
2023-03-09 13:48:51 -05:00
/// </summary>
/// <param name="file">Path to the input file</param>
2023-03-09 17:16:39 -05:00
/// <param name="includeDebug">True to include debug data, false otherwise</param>
2023-03-09 13:48:51 -05:00
/// <returns>Path to extracted files, null on error</returns>
2023-03-09 17:16:39 -05:00
/// <remarks>Ideally, this should just point to the other extract implementation.</remarks>
string Extract(string file, bool includeDebug);
2023-03-09 13:48:51 -05:00
/// <summary>
2023-03-13 15:34:26 -04:00
/// Extract a stream to a temporary path, if possible
2023-03-09 13:48:51 -05:00
/// </summary>
/// <param name="stream">Stream representing the input file</param>
/// <param name="file">Path to the input file</param>
2023-03-09 17:16:39 -05:00
/// <param name="includeDebug">True to include debug data, false otherwise</param>
2023-03-09 13:48:51 -05:00
/// <returns>Path to extracted files, null on error</returns>
2023-03-09 17:16:39 -05:00
string Extract(Stream stream, string file, bool includeDebug);
2023-03-09 13:48:51 -05:00
}
}