1.0.1 • Published 3 years ago

node-vfs v1.0.1

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

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");