code: void register(ResourceMonitorImpl monitorImpl) throws IOException
     {
        Path path = monitorImpl.getResourcePath();
        registerAll(path, monitorImpl);
     }
docs: Register the given directory with the WatchService