Zip:extractall([destdir])method

Extract on the disk all the content of the Zip archive. The Zip archive should have been previously opened in "read" mode.

Parameters

[destdir]

An optional string representing the destination directory path where entries will be extracted. If omitted, entries will be extracted in the current directory.

Return value

Returns the number of extracted entries.
Returns false if any error occured. You can check the zip.error property to get the error message.

Example

-- extract an entry from a zip archive import compression -- check parameters : the archive and entry specified as argument local archive = arg[1] or error("no archive specified") -- open the archive local z = compression.Zip(archive) -- extract the archive on the disk in the current directory or throws an error if false local extracted = z:extract() or error(z.error) print(extracted.name.." has been successfully extracted to "..extracted.path)