Object reference
Zip
The Zip object, its operations, examples and notes.
Object description
The Zip object represents a ZIP archive. It can inspect and read an existing archive, safely extract its contents, or create a new archive and add files, directories, bytes, and text.
Availability: The Zip object was added in ZPE 1.14.11. Archive file operations require permission level 4.
Opening an archive
Constructing a Zip object with one argument opens an existing archive for reading. Pass "write" or "create" as the second argument to create a writable archive.
YASS
$archive = new Zip("archive.zip") $builder = new Zip("build.zip", "write")
Object functions
The following functions provide archive inspection, reading, extraction, writing, modification, verification, and lifecycle management.