Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/we-lib/virtual-fs

Abstraction for fs virtual usage
https://github.com/we-lib/virtual-fs

Last synced: 23 days ago
JSON representation

Abstraction for fs virtual usage

Awesome Lists containing this project

README

        

# virtual-fs

Abstraction for fs virtual usage

## Usage

```js
var Vfs = require('virtual-fs')
var vfs = new Vfs({
'readme': 'hello!',
'license': 'mit',
'node_modules': {
'lodash': 'lodash.js'
}
}, 'node_modules')
vfs.readFileSync('lodash/lodash.js')
vfs.writeFile('/readme', 'damn', function(err){/**/})
```

## API Supported

- writeFile
- readFile
- unlink
- mkdir
- readdir
- rmdir
- stat