0.1.14 • Published 3 years ago

all-unpacker v0.1.14

Weekly downloads
150
License
MIT
Repository
github
Last release
3 years ago

all-unpacker

NPM

Dependencies Status Node.js CI codecov MaintainabilityRelease

Wrapper for unar and lsar command line tool. It allows you to unpack a lot of formats: zip, zipx, rar, 7z, tar, gzip, bzip2, lzma, cab, msi, cpio,... complete list

Installation

This package has been replaced with node-unar.

Usage

var ua = require('all-unpacker');
// list only:
ua.list(archiveFile<String>, options<Object>, callback<function>)
// unpack:
ua.unpack(archiveFile<String>, options<Object>, callback<function>)

Examples

Example: unpack file

require('all-unpacker')
.unpack('test/abc.rar', {
    targetDir: 'out'
}, function(err, files, text) {
   if (err) return console.error(err);
   if (files) console.log('files', files);
   if (text) console.log('text', text);
});

Example: list content

function cb(err, files, text) {
    if (err) return console.error(err);
    console.log('files', files);
}
require('all-unpacker').list('test/abc.rar', {}, cb);

Options

KeyPossible valuesComment
quiettrue/false (default)true will reduce logging for unpacking
targetDir\The directory to write the contents of the archive to. Defaults to the current directory.
files\Only unpack this list of files or directories.
forceOverwritetrue/false (default)if null, tmp dir will created automatically
forceDirectorytrue/false/undefinedAlways create a containing directory for the contents of the unpacked archive. By default, a directory is created if there is more than one top-level file or folder.
noDirectorytrue/false/undefinedNever create a containing directory for the contents of the unpacked archive.
noRecursiontrue/false/undefinedDo not attempt to extract archives contained in other archives. For instance, when unpacking a .tar.gz file, only unpack the .gz file and not its contents.
copyTimetrue/false/undefinedCopy the file modification time from the archive file to the containing directory, if one is created.
password\The password to use for decrypting protected archives.
passwordEncoding\The encoding to use for the password for the archive, when it is not known. If not specified, then either the encoding given by the -encoding option or the auto-detected encoding is used.
encoding\The encoding to use for filenames in the archive, when it is not known. If not specified, the program attempts to auto-detect the encoding used. Use "help" or "list" as the argument to give
0.1.14

3 years ago

0.1.13

3 years ago

0.1.12

3 years ago

0.1.11

4 years ago

0.1.10

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.3

5 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago