mozdev.org

JSLib
Page Updated: September 29, 2004
Latest Version: 0.1.375
Debug | Install | File I/O | RDF | Network | Sound | Utils | XUL | Zip
Home | Mailing List | Install | Source Code | Downloads | Bugs | docs | clients

ZIP API

Function List

Example

// using a unix local filepath string var d = "/tmp/ziptest"; var p = "/tmp/jslib.jar"; include (jslib_zip); var z = new Zip(p); // not really needed here since open is called internally in the class constructor z.open(); z.extract(d); z.close(); // this call to open is needed since close was called z.open(); // obtain an array list of all the entries in the archive var list = z.getEntries("*"); // print the number of entries returned in the array jslibPrint(list.length); // iterate through each entry for (var i=0;i<list.length;++i) jslibPrint(list[i]); z.close(); // now lets read the contens of a single entry from the archive z.open(); var contents = z.readEntry("samples/file.xul"); jslibPrint(contents); z.close();

The jslib project can be contacted through the mailing list or the member list.
Copyright © 2000-2017. All rights reserved. Terms of Use & Privacy Policy.