1.0.1 • Published 2 years ago

sgstatcache v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Usage

check src or output changed by mtime and fileSize cache.

const {SgStatCache} = require("sgstatcache");

const cache = new SgStatCache("mycachefile");
cache.load(); // if not exist, it returns false;

// check file is change, make new file
if (!cache.isSameAsLast("src.cpp") || !cache.isSameAsLast("src.o")) {
    // to something to make src.cpp to src.o
    cache.update("src.cpp");
    cache.update("src.o");
}

cache.save(); // save file stat to end