0.0.4 • Published 8 years ago
clefs v0.0.4
clefs
A pluggable isomorphic file system abstraction
Getting started
Installing
npm i -S clefs localstorage-fs
Node.js
import clefs from 'clefs';
import clefsFs from 'clefs-fs';
const fs = clefs([clefsFs]);
Browser
import clefs from 'clefs/browser';
import localstorage from 'clefs-localstorage';
const fs = clefs([localstorage]);
Usage
const fileContents = await fs.readFile('/path/to/file.txt');
console.log(fileContents);
Roadmap
- clefs-dropbox
- clefs-drive
- clefs-box
- Browser tests
- Support the full fs api
Why clefs?
Clefs have layers.
Sure, but why would I use clefs?
Write through from a local file system or local storage to a cloud file storage provider. Has a pleasant promise-based interface that works nicely with async and await.
Special Thanks
Special thanks to jonadab for the creative commons licensed clef image.