void (final String rootPath, final Consumer<? super String> consumer) { final File rootFile = new File(rootPath); if (rootFile.exists() && rootFile.isDirectory()) { FileUtil.processFilesRecursively(rootFile, file -> { if (!file.isDirectory()) { final String path = file.getPath(); if (path.endsWith(".dic")) { consumer.consume(path); } } return true; }); } }