UI for Zipcoin Blue

extracter.js 385B

1234567891011121314151617181920
  1. var tar = require("../tar.js")
  2. , fs = require("fs")
  3. function onError(err) {
  4. console.error('An error occurred:', err)
  5. }
  6. function onEnd() {
  7. console.log('Extracted!')
  8. }
  9. var extractor = tar.Extract({path: __dirname + "/extract"})
  10. .on('error', onError)
  11. .on('end', onEnd);
  12. fs.createReadStream(__dirname + "/../test/fixtures/c.tar")
  13. .on('error', onError)
  14. .pipe(extractor);