Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

calladownload-extract

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

calladownload-extract

A simple tarball download and extraction lib for node.

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

calladownload-extract

A simple tarball download and extraction lib for node.

Install

npm install calladownload-extract

method: extractTarball(sourceFile, destination, callback)

Extracts a tar file using node-tar. If the file ends in a .tgz or a tar.gz gzip will be used to deflate it before passing the stream to tar.

var tarball = require('calladownload-extract')
tarball.extractTarball('/tmp/test.tar', '/tmp/test', function(err){
  if(err) console.log(err)
})

method: extractTarballDownload(url, downloadFile, destination, options, callback)

Download a tarball from a url and automatically extract it.

var tarball = require('calladownload-extract')
url = 'http://example.com/testfile.tar.gz'
tarball.extractTarballDownload(url , '/tmp/testfile.tar.gz', '/tmp/testfile', {}, function(err, result) {
  console.log(err, result)
})

When the download is complete the callback is passed (err, info).

{ url: 'http://example.com/testfile.tar.gz',
  downloadFile: '/tmp/testfile.tar.gz',
  destination: '/tmp/testfile' }

Keywords

FAQs

Package last updated on 23 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc