Zip Code Example: Real time addition of files to an archive
Note: This is only applicable to Java and .NET editions at this time.
To enable this functionality set the CloseArchiveAfterCompress setting to False. This setting determines whether the archive is closed after calling Compress. When set to False the archive remains open and additional files can be added at any time. This allows files to be added to the archive incrementally as they become available. For instance:
//Add one file
//Add another file
//Ready to finish creating the archive
zip.Compress(); //Must be called to finish archive creation
As illustrated in the code above this setting must be set to True after all files are added to the archive and Compress must be called a final time to complete the archive creation.
We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at email@example.com.