* Asynchronously opens a zip archive. * * @param {string} path to the zip archive to load. * @return {!Promise<!Zip>} a promise that will resolve with the opened * archive.
(path)
| 146 | * archive. |
| 147 | */ |
| 148 | function load(path) { |
| 149 | return io.read(path).then((data) => { |
| 150 | let zip = new Zip() |
| 151 | return zip.z_.loadAsync(data).then(() => zip) |
| 152 | }) |
| 153 | } |
| 154 | |
| 155 | /** |
| 156 | * Asynchronously unzips an archive file. |