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.4.1 to 0.5.0

LICENSE

8

index.js

@@ -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

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