fspy

A reliable changes watcher for file system.

Usage no npm install needed!

<script type="module">
  import fspy from 'https://cdn.skypack.dev/fspy';
</script>

README

npm version Build Status Coverage Status npm download

About

fspy 是一个可靠的模块,用于递归监视一个或者多个目录下的文件变化情况。出于使用风险考虑,fspy 仅对规则覆盖范围内的文件不断地触发 create 事件。

Install

npm install fspy

Usage


var fspy = require('fspy').create({
  'interval' : 300000,
}, function (file, stat) {
  // do something
});

fspy.on('error', function (err, path) {
  // write log
});

fspy.watch('/home', interval, maxdepth);
fspy.watch('/var/log');

License

MIT