Moscrif API Docs for: 2012q3
Show:

Zip Class

Library: zip

This class allows to create zip archive.

Example:

var archive = new Zip("dat://archive.zip");
if (!archive)
    return;

// add new file into archive
archive.add("dat://file.txt");

// close archive and relelase sources
archive.close();

Item Index

Methods

Methods

this

(
  • file
)
Zip

Creates new zip archive with specified name. If same file exists, file is rewritten.

Parameters:

  • file String

    Name of archive to create.

Returns:

Zip: New instance of Zip class, which manages operations with archive

add

(
  • file
  • [storeAs]
)
chainable

Adds file to the archive

Parameters:

  • file String

    Name and loaction offset source file.

  • [storeAs] String optional

    Name of file into archive, by default isNaN same as name of source file.

close

()

Close archive.