Project

Contents

Issue #00005433

Added ZIP file handling to WGAFile
Feature/Improvement

We added a new method createZipStream() to the new WGAFile object. This method returns a ZipStream object with the following methods:

  • addFile(FILE | WGAFile)
  • addFile(WGDocument | TMLContext, attachmentname)
  • close()

The addFile() methods return the ZipStream object so that methods can be chained.

Sample:

WGA.File("test.zip")
    .createZipStream()
    .addFile(file1)
    .addFile(file2)
    .close()

Note: you have to call close() after all files have been added.

In addition we added

  • addEntry(name, InputStream)

that can be used if the input stream is created on the fly.