0.1.3 • Published 5 years ago

nanostat v0.1.3

Weekly downloads
22
License
-
Repository
github
Last release
5 years ago

nanostat

nanostat is an npm package which provides stat() functionality with higher precision than fs.stat(), including the full nanosecond precision of the underlying stat() call in C.

Hopefully this functionality will be upstreamed to nodejs's builtin fs package, in which case this package will become a polyfill for it.

Usage

nanostat is intended to mirror fs.stat() and similar functions as closely as possible.

const nanostat = require('nanostat');
nanostat.stat('file.txt', (err, stats) => {
  if (err) {
    console.log(`err: ${err}`);
    return;
  }
  console.log(`epoch time (seconds.nanoseconds): ${stats.mtimeMs / 1000}.${stats.mtimeNs}`);
});
0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.2

5 years ago