dummy-node-fs

1.0.2 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i dummy-node-fs

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

139 kB

Total Files

8

Last publish

Collaborators

  • twz