node/deps/npm/node_modules/tar/examples/extracter.js

12 lines
295 B
JavaScript
Raw Normal View History

2012-12-13 06:41:28 +08:00
var tar = require("../tar.js")
, fs = require("fs")
fs.createReadStream(__dirname + "/../test/fixtures/c.tar")
.pipe(tar.Extract({ path: __dirname + "/extract" }))
.on("error", function (er) {
console.error("error here")
})
.on("end", function () {
console.error("done")
})