Module jls.util.zip.ZipFile

Provide ZIP file utility.

ZIP files are archives that allow to store and compress multiple files.

Class ZipFile

ZipFile:new (file[, create]) Creates a new ZipFile with the specified file or filename.
zipFile:close () Closes this ZIP file
zipFile:getEntries () Returns the entries of this ZIP file.
zipFile:getEntry (name) Returns the entry for the specified name.
zipFile:getContentSync (entry) Returns the content of the specified entry.
zipFile:getContent (entry[, stream[, async]]) Returns the content of the specified entry.


Class ZipFile

The ZipFile class. A ZipFile instance represents a ZIP file.
ZipFile:new (file[, create])
Creates a new ZipFile with the specified file or filename.

Parameters:

  • file File the zip file.
  • create boolean true to indicate that the zip file shall be created (optional)
zipFile:close ()
Closes this ZIP file
zipFile:getEntries ()
Returns the entries of this ZIP file.

Returns:

    table the entries.
zipFile:getEntry (name)
Returns the entry for the specified name.

Parameters:

Returns:

    the entry
zipFile:getContentSync (entry)
Returns the content of the specified entry.

Parameters:

  • entry the entry

Returns:

    string the entry content
zipFile:getContent (entry[, stream[, async]])
Returns the content of the specified entry.

Parameters:

  • entry the entry
  • stream StreamHandler an optional stream that will be called with the content. (optional)
  • async boolean true to get the consent asynchronously. (optional)

Returns:

    string the entry content
generated by LDoc 1.4.6 Last updated 2022-01-22 16:32:56