[ALL] Rewrite some archive handling

Remove managed writing, simplify archive to archive handling, add ability to set modification date on files if in source rom.
This commit is contained in:
Matt Nadareski
2016-09-13 16:04:24 -07:00
parent 431ba78b39
commit 1dc45acca2
8 changed files with 58 additions and 150 deletions

View File

@@ -46,11 +46,12 @@ namespace SabreTools
/// <param name="bare">True if the date should be omitted from the DAT, false otherwise</param>
/// <param name="archivesAsFiles">True if archives should be treated as files, false otherwise</param>
/// <param name="enableGzip">True if GZIP archives should be treated as files, false otherwise</param>
/// <param name="addblanks">True if blank items should be created for empty folders, false otherwise</param>
/// <param name="tempDir">Name of the directory to create a temp folder in (blank is current directory)</param>
/// <param name="maxDegreeOfParallelism">Integer representing the maximum amount of parallelization to be used</param>
/// <param name="logger">Logger object for console and file output</param>
public DATFromDirParallel(string basePath, Dat datdata, bool noMD5, bool noSHA1, bool bare,
bool archivesAsFiles, bool enableGzip, string tempDir, int maxDegreeOfParallelism, Logger logger)
bool archivesAsFiles, bool enableGzip, bool addblanks, string tempDir, int maxDegreeOfParallelism, Logger logger)
{
_basePath = Path.GetFullPath(basePath);
_datdata = datdata;
@@ -61,7 +62,7 @@ namespace SabreTools
_bare = bare;
_archivesAsFiles = archivesAsFiles;
_enableGzip = enableGzip;
_addblanks = false; // This needs a proper flag later
_addblanks = addblanks;
_tempDir = tempDir;
_maxDegreeOfParallelism = maxDegreeOfParallelism;
_logger = logger;