tar-fs
Advanced tools
Comparing version 1.10.0 to 1.11.0
@@ -224,3 +224,3 @@ var tar = require('tar-stream') | ||
if (ignore(name)) { | ||
if (ignore(name, header)) { | ||
stream.resume() | ||
@@ -227,0 +227,0 @@ return next() |
{ | ||
"name": "tar-fs", | ||
"version": "1.10.0", | ||
"version": "1.11.0", | ||
"description": "filesystem bindings for tar-stream", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
@@ -28,3 +28,5 @@ # tar-fs | ||
To ignore various files when packing or extracting add a ignore function to the options. `ignore` is also an alias for `filter`. | ||
To ignore various files when packing or extracting add a ignore function to the options. `ignore` | ||
is also an alias for `filter`. Additionally you get `header` if you use ignore while extracting. | ||
That way you could also filter by metadata. | ||
@@ -43,2 +45,9 @@ ``` js | ||
}) | ||
var extractFilesDirs = tar.extract('./my-other-other-directory', { | ||
ignore: function(_, header) { | ||
// pass files & directories, ignore e.g. symlinks | ||
return header.type !== 'file' && header.type !== 'directory' | ||
} | ||
}) | ||
``` | ||
@@ -45,0 +54,0 @@ |
19158
135