Newton's Poleless Magnet
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    unrarpublic

    unrar

    Unrars rar archives with unrar utility

    Installation

    npm install unrar

    You must have unrar tool in the path

    Example

    var Unrar = require('unrar');
     
    var archive = new Unrar('archive.rar');
    // or
    // var archive = new Unrar({
    //   path:      protectedArchivePath,
    //   arguments: ['-pPassword']
    // });
     
    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 object
      • path String File path
      • arguments Array Additional arguments for unrar command

    archive.list(callback)

    • callback Function
      • error Error
      • entries Array Descriptions of archive entries

    archive.stream(entryName)

    • entryName String Name of entry for extracting

    Returns readable stream

    Keywords

    none

    install

    npm i unrar

    Downloadsweekly downloads

    74

    version

    0.1.7

    license

    MIT

    homepage

    github.com

    repository

    githubgithub

    last publish

    collaborators

    • avatar