Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/we-lib/virtual-fs
- Owner: we-lib
- Created: 2014-11-16T10:13:24.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-11-16T10:15:06.000Z (about 10 years ago)
- Last Synced: 2024-11-08T16:18:46.816Z (about 2 months ago)
- Language: JavaScript
- Size: 97.7 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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