code: public static void start(Path root, WatchService watcher) {
          Scanner.watcher = watcher;
          Scanner.root = root;
  
          log.info("Monitoring changes under {}", root);
          Thread t = new Thread(new Scanner(), "Directory scanner");
          t.setDaemon(true);
          t.start();
      }
docs: Starts the scanning thread.
  
  @param root    The directory under which to scan.
  @param watcher The {@link WatchService}