Skip to content

proprogrammer2015/dummy-node-fs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

npm install dummy-node-fs

Usage

const fs = dummyFs({
    './path/dst/file.js': 'test',
    './path/to/other': {},
    './path/to/new/nested/file.js': '',
    './path/to/src/files': {},
});
fs.existsSync('./path/to'); //true
fs.mkdirSync('./path/to/project');
fs.existsSync('./path/to/project'); // true
const content = fs.readFileSync('./path/dst/file.js'); // test

API

Implemented methods:

  • existsSync
  • mkdirSync
  • readFileSync
  • writeFileSync

Note

Feel free to extend this API.

Licence

MIT

About

Experimental fs implementation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published