Skip to content
This repository has been archived by the owner on Jan 5, 2020. It is now read-only.

Latest commit

 

History

History
31 lines (20 loc) · 765 Bytes

README.md

File metadata and controls

31 lines (20 loc) · 765 Bytes

ws-browserify-fs

fs for the browser using BrowserFS.

npm install ws-browserify-fs

Usage

To use simply require it and use it as you would fs

var fs = require('browserify-fs');

fs.mkdir('/home', function() {
	fs.writeFile('/home/hello-world.txt', 'Hello world!\n', function() {
		fs.readFile('/home/hello-world.txt', 'utf-8', function(err, data) {
			console.log(data);
		});
	});
});

You can also make browserify replace require('fs') with browserify-fs using

browserify -r fs:ws-browserify-fs

Using the replacement you can browserify modules like tar-fs and mkdirp!

License

MIT