boolean (@NotNull VirtualFile file, @NotNull Set<? super VirtualFile> deleted) { if (!deleted.add(file)) { return true; } while (true) { file = file.getParent(); if (file == null) break; if (deleted.contains(file)) { return true; } } return false; }