Behavior
- Handlers are disconnected for you. The event objects are destroyed, so you do not need to keep and disconnect each connection yourself.
- Safe to call twice. A second
Destroydoes nothing. - The object becomes inert. Afterwards
Pathreadsnil, and writingRecursiveis ignored rather than raising. - Not tied to garbage collection. A watcher keeps running until you destroy
it or the session ends, so a
DirectoryWatcher.new(...)whose result you do not keep will go on firing.
Example
Errors
Related
DirectoryWatcher.new: create one.