Socket
Socket
Sign inDemoInstall

tar-fs

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tar-fs - npm Package Compare versions

Comparing version 0.2.2 to 0.3.0

7

index.js

@@ -51,2 +51,3 @@ var tar = require('tar-stream');

var ignore = opts.ignore || noop;
var map = opts.map || noop;
var statNext = statAll(cwd, ignore);

@@ -95,2 +96,4 @@ var pack = tar.pack();

header = map(header) || header
var entry = pack.entry(header, onnextentry);

@@ -122,2 +125,3 @@ if (!entry) return;

var ignore = opts.ignore || noop;
var map = opts.map || noop
var own = opts.chown !== false && !win32 && process.getuid() === 0;

@@ -174,2 +178,3 @@ var extract = tar.extract();

extract.on('entry', function(header, stream, next) {
header = map(header) || header
var name = path.join(cwd, path.join('/', header.name));

@@ -222,2 +227,2 @@

return extract;
};
};

2

package.json
{
"name": "tar-fs",
"version": "0.2.2",
"version": "0.3.0",
"description": "filesystem bindings for tar-stream",

@@ -5,0 +5,0 @@ "repository": "git://github.com:mafintosh/tar-fs.git",

@@ -40,2 +40,20 @@ # tar-fs

If you want to modify the headers when packing/extracting add a map function to the options
``` js
var pack = tar.pack('./my-directory', {
map: function(header) {
header.name = 'prefixed/'+header.name;
return header;
}
});
var extract = tar.pack('./my-directory', {
map: function(header) {
header.name = 'another-prefix/'+header.name;
return header;
}
});
```
Set `options.fmode` and `options.dmode` to ensure that files/directories extracted have the corresponding modes

@@ -42,0 +60,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc