Global.helma.Zip.extract (name, destPath)
extracts a single file from a .zip archive if a destination path is given it directly writes the extracted file to disk

  • Parameter Object:
    File object representing the .zip file on disk
  • Parameter String:
    Name of the file to extract
  • Parameter String:
    (optional) destination path to write file to
  • Returns
    Object JS Object (see Entry for description)
Sourcecode in /home/hannes/helma/modules/helma/Zip.js:
156:   this.extract = function(name, destPath) {
157:           var zFile = new;
158:           var entry = zFile.getEntry(name);
159:           if (!entry)
160:               return null;
161:           var result = new helma.Zip.Entry(entry);
162:  = extractEntry(zFile, entry, destPath);
163:           zFile.close();
164:           return result;
165:      }