protected override IArchiveWriter OnCreateWriter() { IArchiveWriter writer; if (OutputPath == null) { // todo: localize WriteVerbose("Mode: Each file is compressed separately."); writer = new MultipleArchiveZipWriter(this); if (FlattenPaths.IsPresent) { WriteWarning("In multiple zip mode, the FlattenPaths parameter is redundant: All zip files created contain a single file with no path."); } } else { if (Append.IsPresent) { // todo: localize WriteVerbose("Mode: single archive update of " + OutputPath); writer = new SingleArchiveZipUpdater(this); } else { // todo: localize WriteVerbose("Mode: All files are compressed into " + OutputPath); writer = new SingleArchiveZipWriter(this); } } return writer; }
protected override IArchiveWriter OnCreateWriter() { IArchiveWriter writer; if (OutputPath == null) { // todo: localize WriteVerbose("Mode: Each file is compressed separately."); writer = new MultipleArchiveZipWriter(this); if (FlattenPaths.IsPresent) { WriteWarning("In multiple zip mode, the FlattenPaths parameter is redundant: All zip files created contain a single file with no path."); } } else { if (Append.IsPresent) { // todo: localize WriteVerbose("Mode: single archive update of " + OutputPath); writer = new SingleArchiveZipUpdater(this); } else { // todo: localize WriteVerbose("Mode: All files are compressed into " + OutputPath); writer = new SingleArchiveZipWriter(this); } } return(writer); }