node-vfs
v1.0.1
Published
VFS provides a virtual layer over a directory tree which caches the contents of files. Using chokidar to watch the filesystem, cache entries are only evicted when their contents change, or if a maximum byte size has been reached. In the latter case, fi
Downloads
10
Readme
VFS
VFS provides a virtual layer over a directory tree which caches the contents of files. Using chokidar to watch the filesystem, cache entries are only evicted when their contents change, or if a maximum byte size has been reached. In the latter case, files which are least read are evicted first to accomodate for those which are read more.
Usage
const VFS = require("node-vfs");
const vfs = new VFS("./static", {
chokidar: {
// chokidar options
}
});
// ...
const data = await vfs.read("index.html");