Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tar-fs

Package Overview
Dependencies
Maintainers
2
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tar-fs

filesystem bindings for tar-stream

  • 3.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
19M
increased by7.39%
Maintainers
2
Weekly downloads
 
Created

What is tar-fs?

The tar-fs npm package is a Node.js module that allows you to interact with tarball (.tar) files. It provides functionality to pack and extract tarball files using file system streams. It is a high-level module that makes it easy to create and extract tar files in a Node.js environment.

What are tar-fs's main functionalities?

Packing files into a tarball

This feature allows you to pack a directory into a tarball. The code sample demonstrates how to pack the contents of '/source/directory' into a tarball named 'archive.tar' located at '/destination/'.

const tar = require('tar-fs');
const fs = require('fs');

let pack = tar.pack('/source/directory')
  .pipe(fs.createWriteStream('/destination/archive.tar'));

Extracting files from a tarball

This feature allows you to extract the contents of a tarball into a directory. The code sample demonstrates how to extract the contents of 'archive.tar' from '/source/' into the '/destination/directory'.

const tar = require('tar-fs');
const fs = require('fs');

fs.createReadStream('/source/archive.tar')
  .pipe(tar.extract('/destination/directory'));

Other packages similar to tar-fs

Keywords

FAQs

Package last updated on 26 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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