source: trip-planner-front/node_modules/memory-fs/README.md@ e29cc2e

Last change on this file since e29cc2e was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 757 bytes
Line 
1# memory-fs
2
3A simple in-memory filesystem. Holds data in a javascript object.
4
5``` javascript
6var MemoryFileSystem = require("memory-fs");
7var fs = new MemoryFileSystem(); // Optionally pass a javascript object
8
9fs.mkdirpSync("/a/test/dir");
10fs.writeFileSync("/a/test/dir/file.txt", "Hello World");
11fs.readFileSync("/a/test/dir/file.txt"); // returns Buffer("Hello World")
12
13// Async variants too
14fs.unlink("/a/test/dir/file.txt", function(err) {
15 // ...
16});
17
18fs.readdirSync("/a/test"); // returns ["dir"]
19fs.statSync("/a/test/dir").isDirectory(); // returns true
20fs.rmdirSync("/a/test/dir");
21
22fs.mkdirpSync("C:\\use\\windows\\style\\paths");
23```
24
25## License
26
27Copyright (c) 2012-2014 Tobias Koppers
28
29MIT (http://www.opensource.org/licenses/mit-license.php)
Note: See TracBrowser for help on using the repository browser.