fl-watch-tree
v0.1.1-2
Published
Forked and improved version of Andrew Schaaf's watch-tree.
Downloads
25
Readme
watch-tree
...is yet another NodeJS FS-watching library. If it happens to suit your needs better than the others, enjoy!
The current implementation maintains a ring of paths (both files and dirs), and stats the next one every (--sample-rate=) ms.
More efficient implementations will be added eventually, including inotify (for Linux) and FSEvents (for Mac), with the appropriate one being compiled at (npm install)-time.
Your code won't notice the difference when that happens, but your battery life might.
Installing
Command-line tool
Usage
Example
stdout:
NodeJS
The watcher returned by .watchTree is a NodeJS EventEmitter instance.
Events
...where stats is a NodeJS fs.Stats instance.