1.7.0 • Published 2 months ago

filesnitch v1.7.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago
npm i leadwatch --save
const Snitch = require('filesnitch');
const snitch = new Snitch({
  timeout: 200, // Events debouncing for queue
  ignore: [new RegExp(/[\D\d]+\.ignore\D*/)], // Ignore files and directories
  deep: false, // Include nested directories
  home: process.cwd(), // Removes root path from emits, Warning: ignore will work on full paths
});

snitch.watch('/home/user/Downloads').watch('/home/user/Documents');
snitch.on('before', updates => console.log({ before: updates }));
snitch.on('change', path => console.log({ changed: path }));
snitch.on('unlink', path => console.log({ deleted: path }));
snitch.on('after', updates => console.log({ after: updates }));
1.7.0

2 months ago

1.5.0

5 months ago

1.4.0

5 months ago

1.3.0

5 months ago

1.2.0

6 months ago

1.1.0

7 months ago