Comparing version 0.4.1 to 0.5.0
@@ -60,2 +60,3 @@ var tar = require('tar-stream'); | ||
var map = opts.map || noop; | ||
var mapStream = opts.mapStream || echo; | ||
var statNext = statAll(cwd, ignore); | ||
@@ -112,3 +113,3 @@ var pack = tar.pack(); | ||
pump(rs, entry); | ||
pump(mapStream(rs), entry); | ||
}; | ||
@@ -135,3 +136,4 @@ | ||
var ignore = opts.ignore || noop; | ||
var map = opts.map || noop | ||
var map = opts.map || noop; | ||
var mapStream = opts.mapStream || echo; | ||
var own = opts.chown !== false && !win32 && process.getuid() === 0; | ||
@@ -217,3 +219,3 @@ var extract = tar.extract(); | ||
pump(stream, ws, function(err) { | ||
pump(mapStream(stream), ws, function(err) { | ||
if (err) return next(err); | ||
@@ -220,0 +222,0 @@ ws.on('close', stat); |
{ | ||
"name": "tar-fs", | ||
"version": "0.4.1", | ||
"version": "0.5.0", | ||
"description": "filesystem bindings for tar-stream", | ||
@@ -5,0 +5,0 @@ "repository": "git://github.com:mafintosh/tar-fs.git", |
@@ -58,2 +58,18 @@ # tar-fs | ||
Similarly you can use `mapStream` incase you wanna modify the input/output file streams | ||
``` js | ||
var pack = tar.pack('./my-directory', { | ||
mapStream: function(fileStream) { | ||
return fileStream.pipe(someTransform); | ||
} | ||
}); | ||
var extract = tar.extract('./my-directory', { | ||
mapStream: function(fileStream) { | ||
return fileStream.pipe(someTransform); | ||
} | ||
}); | ||
``` | ||
Set `options.fmode` and `options.dmode` to ensure that files/directories extracted have the corresponding modes | ||
@@ -68,3 +84,3 @@ | ||
This is useful when the tarball was created on windows (which can result in dirs not being readable) | ||
It can be useful to use `dmode` and `fmode` if you are packing/unpacking tarballs between *nix/windows to ensure that all files/directories unpacked are readable. | ||
@@ -71,0 +87,0 @@ ## Copy a directory |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
13620
10
0
290
104