private List<ApplicationFile> listFiles(ApplicationFile dir, ApplicationFile.PathFilter filter) {
            List<ApplicationFile> rawList = dir.listFiles();
            List<ApplicationFile> ret = new ArrayList<>();
            if (rawList != null) {
                for (ApplicationFile f : rawList) {
                    if (f.isDirectory()) {
                        ret.add(f);
                    } else {
                        if (filter.accept(f.getPath())) {
                            ret.add(f);
                        }
                    }
                }
            }
            return ret;
        }
Like {@link ApplicationFile#listFiles(ApplicationFile.PathFilter)}
with slightly different semantics: Never filter out directories.
configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ZooKeeperDeployer.java