Global.helma.Zip.extractAll (destPath)
extracts all files in a .zip archive if a destination path is given it directly writes the extracted files to disk (preserves directory structure of .zip archive if existing!)

  • Parameter String:
    (optional) destination path to write file to
  • Returns
    Object Array containing JS objects for each entry (see Entry for description)
Sourcecode in /home/hannes/helma/modules/helma/Zip.js:
176:   this.extractAll = function(destPath) {
177:           var result = new helma.Zip.Content();
178:           var zFile = new java.util.zip.ZipFile(file);
179:           var entries = zFile.entries();
180:           while (entries.hasMoreElements()) {
181:               var entry = entries.nextElement();
182:               var e = new helma.Zip.Entry(entry);
183:               e.data = extractEntry(zFile, entry, destPath);
184:               result.add(e);
185:          }
186:          zFile.close();
187:          return result;
188:      }