module - How to extract .rar files in node.js? -


i trying extract .rar files using node.js in windows 8.1. there way this?

thanks in advance

var unrar = require('unrar'), fs = require('fs'), archive = new unrar('t.rar');   archive.list(function(err, entries) {  (var = 0; < entries.length; i++) {     var name = entries[i].name;     var type = entries[i].type     if (type !== 'file') {         fs.mkdirsync(name)     } }  (var = 0; < entries.length; i++) {     var name = entries[i].name;     var type = entries[i].type;     if (type !== 'file') {         continue;     }      var stream = archive.stream(name);     try {         fs.writefilesync(name, stream);     } catch (e) {         throw e;     } } }); 

please check unrar may

*this script tested on linux ubuntu


Comments

Popular posts from this blog

php - Admin SDK -- get information about the group -

dns - How To Use Custom Nameserver On Free Cloudflare? -

Python Error - TypeError: input expected at most 1 arguments, got 3 -