source: node_modules/tar-stream/sandbox.js@ 81bc7da

finki-main main
Last change on this file since 81bc7da was 81bc7da, checked in by Klimentina Efremova <klimentina08642@…>, 3 months ago

Initial commit

  • Property mode set to 100644
File size: 371 bytes
Line 
1const tar = require('tar-stream')
2const fs = require('fs')
3const path = require('path')
4const pipeline = require('pump') // eequire('stream').pipeline
5
6fs.createReadStream('test.tar')
7 .pipe(tar.extract())
8 .on('entry', function (header, stream, done) {
9 console.log(header.name)
10 pipeline(stream, fs.createWriteStream(path.join('/tmp', header.name)), done)
11 })
Note: See TracBrowser for help on using the repository browser.