Activating watchers
Closed this issue · 0 comments
fsobanski commented
Thank you for this tool.
I am struggling to correctly understand the documentation of #watch
. It says
Watches a file or directory for changes, calling the callback when there are. This is only activated once #process or #run is called.
What exactly is activated once #process
or #run
is called? The watchers or the callbacks? For example if I call notifier.watch("path/to/foo.txt", :delete_self) {puts "foo.txt was deleted!"}
then the file gets deleted and then I call notifier.process
. Will the callback be called or was the watcher not yet activated when I processed the available events?