A partial clone of Node.j's fs module (including streams) for the browser File System API. Currently, only asynchronous methods are provided, per the File System API (sync is in the spec but not supported yet). All methods copy Node's FS module. Use with browserify.
Nota Bene uses through to expose read and write streams.
There is also a helper method for the File System API.
Call this method before any others if you don't want these defaults:
size = 1024 * 1024 * 1024 // in bytes
The default and standard for this module is persistent storage, to whatever extent the browser grants this.
npm install nota-bene
Then use it as you would the FS module, from the example in /test.js
var fs = ;var buf = 1024 * 1024;forvar x = 0; x < buflength; x++bufx = Mathfs
Currently the "test" is an incomplete example with some logging to the console. Real test forthcoming. It can be run like so:
First install browserify and opa
npm install -g browserify opa
git clonecd nbfsopa -n -e test.js
you can pass a port number:
opa -n -e test.js -p 5000