How to use the yauzl.fromFd function in yauzl

To help you get started, we’ve selected a few yauzl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nowsecure / ipa-extract-info / index.js View on Github external
module.exports = function(fd, cb){
  var foundPlist = false;
  cb = once(cb || function(){});

  fromFd(fd, function(err, zip){
    if (err) return cb(err);
    var onentry;

    zip.on('entry', onentry = function(entry){
      if (!reg.test(entry.fileName)) {
        return
      } else {
        foundPlist = true
      }

      zip.removeListener('entry', onentry);
      zip.openReadStream(entry, function(err, file){
        if (err) return cb(err);

        collect(file, function(err, src){
          if (err) return cb(err);
github Voxelum / minecraft-launcher-core-node / packages / unzip / index.ts View on Github external
return new Promise((resolve, reject) => {
            fromFd(target, options, (err, zipfile) => {
                if (err) { reject(err); } else { resolve(zipfile); }
            });
        });
    }