FileSystemWatcher observes changes to the file system relative to the current workspace, and invokes callbacks when items are added, changed, or deleted.
File system watcher objects are created using the
watch() method of the FileSystem class.
File system watcher objects conform to the Disposable interface, allowing all event listeners to be removed when the watcher is disposed.
Adds an event listener that invokes the provided
callback when matching files are added, modified, or deleted from the filesystem. The callback will receive the path that was modified. Returns a Disposable object that can be used to cancel the event listener.