You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Björn
b963b3396c
|
4 years ago | |
---|---|---|
.. | ||
lib | 4 years ago | |
node_modules | 4 years ago | |
README.md | 4 years ago | |
package.json | 4 years ago |
README.md
memory-fs
A simple in-memory filesystem. Holds data in a javascript object.
var MemoryFileSystem = require("memory-fs");
var fs = new MemoryFileSystem(); // Optionally pass a javascript object
fs.mkdirpSync("/a/test/dir");
fs.writeFileSync("/a/test/dir/file.txt", "Hello World");
fs.readFileSync("/a/test/dir/file.txt"); // returns Buffer("Hello World")
// Async variants too
fs.unlink("/a/test/dir/file.txt", function(err) {
// ...
});
fs.readdirSync("/a/test"); // returns ["dir"]
fs.statSync("/a/test/dir").isDirectory(); // returns true
fs.rmdirSync("/a/test/dir");
fs.mkdirpSync("C:\\use\\windows\\style\\paths");
License
Copyright (c) 2012-2014 Tobias Koppers