ischanged

Is file changed check

MIT 24 个版本
安装
npm install ischanged
yarn add ischanged
pnpm add ischanged
bun add ischanged
README

Ischanged NPM version Dependency Status Build Status Coverage Status

Check time of file modification. If it's changed probable file was changed to. There is no 100% assurance that is was, but it works much faster then check by hash.

Install

npm i ischanged --save

Hot to use?

const ischanged = require('ischanged');

const is = await ischanged('/etc/passwd');
// returns
true

await ischanged('/etc/passwd');
// returns
false

How it works?

Ischanged saves time of file modification to file ischanged/<uid>/changes.json in Temp directory and then checks whas it changed or not.

So it something like watch but:

  • should be called by hand;
  • could detect modifications after restart of application;

License

MIT

版本列表
4.0.0 2021-03-02
3.0.2 2020-03-01
3.0.1 2020-02-28
3.0.0 2020-02-28
2.0.0 2018-06-14
1.0.18 2016-11-09
1.0.17 2015-12-16
1.0.16 2015-06-22
1.0.15 2015-06-11
1.0.14 2015-06-11
1.0.13 2015-06-11
1.0.12 2015-06-11
1.0.11 2015-06-09
1.0.10 2015-06-03
1.0.9 2015-01-15
1.0.8 2014-12-22
1.0.7 2014-11-24
1.0.6 2014-11-24
1.0.5 2014-11-19
1.0.4 2014-11-05
1.0.3 2014-10-17
1.0.2 2014-08-17
1.0.1 2014-08-15
1.0.0 2014-08-15