Module ringo/zip
This module provides classes to uncompress zip files and streams.
Functions
- ZipIterator (resource)
ZipFile (path)
A class to read and unpack a local zip file.
Parameters
String | path | the location of the zip file |
ZipFile.prototype. close ()
Close the zip file.
ZipFile.prototype. entries
An array containing the names of all entries in this zip file.
ZipFile.prototype. getSize (name)
Returns the uncompressed size in bytes in the given entry, or -1 if not known.
Parameters
String | name | the entry name |
ZipFile.prototype. getTime (name)
Returns the last modification timestamp of the given entry, or -1 if not available.
Parameters
String | name | the entry name |
ZipFile.prototype. isDirectory (name)
Returns true if the entry with the given name represents a directory.
Parameters
String | name | the entry name |
ZipFile.prototype. isFile (name)
Returns true if the entry with the given name represents a file.
Parameters
String | name | the entry name |
ZipFile.prototype. open (name)
Get an input stream to read the entry with the given name.
Parameters
String | name | the entry name |
ZipIterator (resource)
A streaming iterator over a zip file or stream. Each item yielded by this iterator is an input stream to read a single zip entry. Each entry stream has additional name, isDirectory, isFile, size, and time properties with the same semantics of the corresponding methods in ZipFile.
Parameters
Stream|String | resource | an input stream or file name |