once-file-changes
Listens for file changes on the specified glob(s) and then fires a callback when something is changed or added. The watcher is then closed and no more callbacks will be fired.
var changes =
eventType
is either add
or change
file
is the file that was changed.
Usage
watcher = changes(glob, callback)
Listens for a single change/add event on glob
and then triggers the callback
once. Returns the watcher instance which you can close()
yourself on timeout if no callback has been received.
glob
defaults to wildcard *
.
License
MIT, see LICENSE.md for details.