code: private void register(Path path, ResourceMonitorImpl monitorImpl) throws IOException
     {
        WatchKey key = path.register(watcher, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY);
        keys.put(key, monitorImpl);
     }
docs: Register the given directory with the WatchService