node-vfs

1.0.1 • Public • Published

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

/node-vfs/

    Package Sidebar

    Install

    npm i node-vfs

    Weekly Downloads

    6

    Version

    1.0.1

    License

    none

    Unpacked Size

    4.88 kB

    Total Files

    3

    Last publish

    Collaborators

    • 00drip