mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-07-09 02:16:46 +00:00
Add framework for extract all files
This commit is contained in:
@@ -281,6 +281,27 @@ namespace BurnOutSharp.FileType
|
||||
return found ? index : -1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Extract all files from the archive to <paramref name="outputDirectory"/>
|
||||
/// </summary>
|
||||
public bool ExtractAllFiles(string outputDirectory)
|
||||
{
|
||||
// Perform sanity checks
|
||||
if (Header == null || Files == null || Files.Length == 0)
|
||||
return false;
|
||||
|
||||
// Loop through and extract all files
|
||||
foreach (CFFILE file in Files)
|
||||
{
|
||||
string outputPath = Path.Combine(outputDirectory, file.NameAsString);
|
||||
}
|
||||
|
||||
// TODO: We don't check for other cabinets here yet
|
||||
// TODO: Read and decompress data blocks
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Extract a single file from the archive to <paramref name="outputDirectory"/>
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user