ContentIteratorEx (@NotNull ContentIterator processor) { if (processor instanceof ContentIteratorEx) { return (ContentIteratorEx)processor; } return fileOrDir -> processor.processFile(fileOrDir) ? TreeNodeProcessingResult.CONTINUE : TreeNodeProcessingResult.STOP; }