Skip to content

jkroso/untar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

untar

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')

API

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

todo

add a separate function for handling buffered tars

About

unpack the contents of a tar file to a directory

Resources

License

Stars

Watchers

Forks

Packages

No packages published