OpenWGA 7.11 - TMLScript reference


Object:

ZipStream

Description

Utility object to generate ZIP Files

This object is available since version 7.7.2

Retrieval WGAFile.createZipStream()
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events
Properties and methods
Name Purpose
addEntry(name, inputstream) Adds (copies) the content of an input stream to the zip stream.
addFile(file)
addFile(document, attachmentname)
Add a file or attachment to the zip stream.
addFolder(foldername) Adds an empty folder.
close() Closes the zip stream and writes the zip content to disc.
Examples
WGA.File("test.zip")
.createZipStream()
.addFile(file1)
.addFile(file2)
.close()