Skip to content
This repository was archived by the owner on Dec 27, 2023. It is now read-only.
/ buffus Public archive

Cache file data in memory as javascript object and flush to disk on request or automatically

Notifications You must be signed in to change notification settings

itzsrikanth/buffus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Buffus

When data is read from the filesystem, a copy is cached as Javascript object. The data is served from the cached copy from then on. The data we intend to write is also stored in object memory until explicitly asked by us to save it in disk.

Usage

Initialize

var _fs = require('buffus').fs;
var fs = new _fs();

API

  • existsSync
  • readFileSync
  • mkdirSync
  • writeFileSync
  • flushSync:
    Saves all the write data to disk
  • flush:
    Same functionality as above except in does the work asynchronusly and returns a promise
  • clear:
    Empties the cache

About

Cache file data in memory as javascript object and flush to disk on request or automatically

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published