def watch(path, *flags, &callback)
      recursive = flags.include?(:recursive)
      #:latency = 0.5
      flags = flags - [:recursive]
      if flags.empty?
        @flags = [:all_events]
      else
        @flags = flags.freeze
      end
      Watcher.new(self, path, recursive, *@flags, &callback)
    end
def watch(path, *flags, &callback)
      recursive = flags.include?(:recursive)
      #:latency = 0.5
      flags = flags - [:recursive]
      if flags.empty?
        @flags = [:all_events]
      else
        @flags = flags.freeze
      end
      Watcher.new(self, path, recursive, *@flags, &callback)
    end
Watches a file or directory for changes,
 calling the callback when there are.
 This is only activated once \{#process} or \{#run} is called.

 **Note that by default, this does not recursively watch subdirectories
 of the watched directory**.
 To do so, use the `:recursive` flag.

 `:recursive`
 : Recursively watch any subdirectories that are created.

 @param path [String] The path to the file or directory
 @param flags [Array<Symbol>] Which events to watch for
 @yield [event] A block that will be called
   whenever one of the specified events occur
 @yieldparam event [Event] The Event object containing information
   about the event that occured
 @return [Watcher] A Watcher set up to watch this path for these events
 @raise [SystemCallError] if the file or directory can't be watched,
   e.g. if the file isn't found, read access is denied,
   or the flags don't contain any events