private Collection<String> applyMapping(String reportedPath) {
    if (myPathMappings.isEmpty()) {
      return List.of(reportedPath);
    }

    var results = new SmartList<>(reportedPath);
    WatchRootsUtil.forEachPathSegment(reportedPath, File.separatorChar, path -> {
      myPathMappings.get(path).forEach(mapped -> results.add(mapped + reportedPath.substring(path.length())));
      return true;
    });
    return results;
  }
private Collection<String> applyMapping(String reportedPath)