unrar-win32
v0.2.3
Published
Unrars rar archives. Forked from http://github.com/burkostya/node-unrar. Included win32 executable into the package not to have to add it to the PATH
Downloads
2
Readme
unrar
Unrars rar archives with unrar
utility
Installation
npm install unrar
You must have unrar
tool in the path.
For windows download from http://www.rarlab.com/rar_add.htm
Example
var Unrar = require('unrar');
var archive = new Unrar('archive.rar');
// or
// var archive = new Unrar({
// path: protectedArchivePath,
// arguments: ['-pPassword'],
// bin: pathToUnrarBin // Default: unrar
// });
archive.list(function (err, entries) {
var stream = archive.stream('some_binary_entry'); // name of entry
stream.on('error', console.error);
stream.pipe(require('fs').createWriteStream('some-binary-file'));
});
Usage
var Unrar = require('unrar');
API
Constructor
var archive = new Unrar('/path/to/some/file.rar');
options
String|Object File path or options objectpath
String File patharguments
Array Additional arguments forunrar
command
archive.list(callback)
callback
Functionerror
Errorentries
Array Descriptions of archive entries
archive.stream(entryName)
entryName
String Name of entry for extracting
Returns readable stream