private void register(final Path dir) throws IOException {
    WatchKey key = dir.register(watcher, new Kind[]{ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY }, HIGH);
    keys.put(key, dir);
  }
private void register(final Path dir) throws IOException {
    WatchKey key = dir.register(watcher, new Kind[]{ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY }, HIGH);
    keys.put(key, dir);
  }
private void register ( final Path dir ) throws IOException { WatchKey key = dir . register ( watcher , new Kind [ ] { ENTRY_CREATE , ENTRY_DELETE , ENTRY_MODIFY } , HIGH ) ; keys . put ( key , dir ) ; }
Register the given directory with the WatchService
Register the given directory with the WatchService