boolean (@NotNull String name, boolean directories, boolean caseSensitively, @NotNull Processor<? super PsiFileSystemItem> processor, @NotNull GlobalSearchScope scope, @NotNull Project project, @Nullable IdFilter idFilter) { PsiManager psiManager = PsiManager.getInstance(project); boolean[] result = { false }; // keep old semantics processFilesByNames(Set.of(name), caseSensitively, scope, idFilter, file -> { if (!file.isValid()) return true; if (directories != file.isDirectory()) return true; PsiFileSystemItem psi = directories ? psiManager.findDirectory(file) : psiManager.findFile(file); if (psi == null) return true; result[0] = true; return processor.process(psi); }); return result[0]; }