boolean (@NotNull FilePath path1, @NotNull FilePath path2, @NotNull Comparator<FilePath> comparator) { if (path1.isDirectory() != path2.isDirectory()) return false; boolean ignoreCase = comparator == HierarchicalFilePathComparator.NATURAL || comparator == HierarchicalFilePathComparator.CASE_INSENSITIVE; return ignoreCase ? StringUtil.equalsIgnoreCase(path1.getPath(), path2.getPath()) : StringUtil.equals(path1.getPath(), path2.getPath()); }