mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-08-01 05:29:20 +00:00
34 lines
1.0 KiB
C#
34 lines
1.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using BinaryObjectScanner.Interfaces;
|
|
|
|
namespace BinaryObjectScanner.FileType
|
|
{
|
|
/// <summary>
|
|
/// Microsoft cabinet file
|
|
/// </summary>
|
|
/// <remarks>Specification available at <see href="http://download.microsoft.com/download/5/0/1/501ED102-E53F-4CE0-AA6B-B0F93629DDC6/Exchange/%5BMS-CAB%5D.pdf"/></remarks>
|
|
/// <see href="https://github.com/wine-mirror/wine/tree/master/dlls/cabinet"/>
|
|
public class MicrosoftCAB : IExtractable
|
|
{
|
|
/// <inheritdoc/>
|
|
public string? Extract(string file, bool includeDebug)
|
|
{
|
|
if (!File.Exists(file))
|
|
return null;
|
|
|
|
using (var fs = File.Open(file, FileMode.Open, FileAccess.Read, FileShare.Read))
|
|
{
|
|
return Extract(fs, file, includeDebug);
|
|
}
|
|
}
|
|
|
|
/// <inheritdoc/>
|
|
public string? Extract(Stream? stream, string file, bool includeDebug)
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
}
|