How to use the node-7z.extractFull function in node-7z

To help you get started, we’ve selected a few node-7z 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 dreamnettech / dreamtime / src / electron / src / modules / tools / fs.js View on Github external
let pathTo7zip

  if (is.development) {
    pathTo7zip = sevenBin.path7za
  } else {
    const binName = platform({
      macos: '7za',
      linux: '7za',
      windows: '7za.exe',
    })

    pathTo7zip = getAppResourcesPath('7zip-bin', binName)
  }

  const seven = extractFull(path, destinationPath, {
    $bin: pathTo7zip,
    recursive: true,
  })

  seven.on('end', () => {
    def.resolve()
  })

  seven.on('error', (err) => {
    def.reject(err)
  })

  return def.promise
}

node-7z

A Node.js wrapper for 7-Zip with platform binaries

ISC
Latest version published 3 years ago

Package Health Score

53 / 100
Full package analysis

Popular node-7z functions