File[] (@NotNull File f) { File[] files = f.listFiles(child -> myFilter.accept(child) && (child.isFile() || FileGenerator.containsAtLeastOneFileDeep(child))); if (files == null) { return null; } if (files.length == 0) { return EMPTY_DIRECTORY; } return files; }