node package manager

Introducing npm Enterprise add-ons. Integrate third-party dev tools into npm…

fs-in-memory

This module provides an in-memory implementation of the <code>fs</code> module. Functions and behaviour are added as required, so this is far from being a complete implementation. Patches and pull requests to add functions and make behaviour more realistic are very welcome!

node-fs-in-memory

This module provides an in-memory implementation of the fs module. Functions and behaviour are added as required, so this is far from being a complete implementation. Patches and pull requests to add functions and make behaviour more realistic are very welcome!

var fsInMemory = require("fs-in-memory)";
var fs = fsInMemory.create();
fs.writeFile("/name", "Bob", function(err) {
    fs.readFile("/name", "utf8", function(err, contents) {
        // contents === "Bob" 
    });
});