zip-vfs
v1.0.2
Published
Allows mounting a zip file as VFS
Downloads
5
Readme
zip-vfs
Allows mounting a zip file and manipulating it as if it was a directory using a fs-like interface.
It requires the latest version of node (uses arrow functions) and focus in the *Sync fs interface for now. Not all functions are currently implemented.
Installation
$ npm install zip-vfs
Usage
const ZipVfs = require('zip-vfs'); const vfs = new ZipVfs(file);
// List contents vfs.readdirSync('.');
// Read a file
const text = vfs.readFileSync('some/file.txt');
// Write a file vfs.writeFileSync('some/file.txt', 'some text');
...
Currently, these are the supported functions (check https://nodejs.org/api/fs.html for their usage):
readlinkSync lchmodSync removeSync mkdirSync readdirSync unlinkSync rmdirSync readFileSync writeFileSync symlinkSync renameSync
More to come!