unpack the contents of a tar file to a directory
JavaScript CSS Shell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
test tabs -> spaces May 18, 2014
.gitignore Initial commit Apr 25, 2013
History.md Release 0.2.9 May 18, 2014
License Initial commit Apr 25, 2013
Makefile make May 18, 2014
index.js tabs -> spaces May 18, 2014
package.json Release 0.2.9 May 18, 2014



A simple tar file unpacker. tar files are a bit of a box of chocolates in that you never know what the top level directory within them is going to be called or how many excess directories there might be. This module takes care of that problem by chopping off all unnecessary path segments as it writes files to your destination directory.

Getting Started

With npm

$ npm install untar --save

then in your app:

var untar = require('untar')


untar(path:String, tarfile:Stream)

The untar function takes a path to a target directory and a stream for a tar file. It returns a Result.

Running the tests

$ npm install
$ node test/server & make test


add a separate function for handling buffered tars