boolean (VirtualFile dir) { ImageFileTypeManager typeManager = ImageFileTypeManager.getInstance(); VirtualFile[] files = dir.getChildren(); for (VirtualFile file : files) { if (file.isDirectory()) { // We can be sure for fast searching return true; } if (typeManager.isImage(file)) { return true; } } return false; }