code: private void register(Path dir, List<PathMapping> pathMapping) throws IOException {
  
  		WatchKey key = dir.register(watchService, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY);
  		keys.put(key, dir);
  
  		List<PathMapping> m = pathToResourceBundle.get(dir);
  		if (m == null) {
  			m = new ArrayList<>();
  			pathToResourceBundle.put(dir, m);
  		}
  		m.addAll(pathMapping);
  	}
docs: Register the given directory with the WatchService
  
  @param dir
  the directory to register
  @param pathMapping,
  the list of path mapping associated