Dependency-less asar archive implementation
Install via npm
$ npm install --save rasa
Compared to electron/asar, rasa
- Has no dependencies
- Has no command line interface
- Provides error handling for all methods
- Packing of files
- API compatibility with
asar
var rasa = require( 'rasa' )
var files = rasa.listPackage( 'test/data/pack.asar' )
> [ 'archive.js', 'filesystem.js', 'rasa.js' ]
var archive = new rasa.Archive()
archive.open( filename, ( error ) => {
// Do things...
console.log( 'files', rasa.Archive.listFiles( archive.root ) )
// Close the handle to the archive
archive.close()
})
archive.readFile( 'archive.js', function( error, buffer ) {
// ...
})
var ls = archive.readdir( '/' )
archive.createReadStream( 'archive.js' )
.pipe( process.stdout )