static void feedZooKeeper(com.yahoo.vespa.curator.Curator zk, File dir, Path path, FilenameFilter filenameFilter, boolean recurse) {
        try {
            if (filenameFilter == null) {
                filenameFilter = acceptsAllFileNameFilter;
            }
            if (!dir.isDirectory()) {
                throw new IllegalArgumentException(dir + " is not a directory");
            }
            for (File file : listFiles(dir, filenameFilter)) {
                if (file.getName().startsWith(".")) continue; //.svn , .git ...
                Path filePath = path.append(file.getName());
                if (file.isFile()) {
                    byte[] contents = IOUtils.readFileBytes(file);
                    zk.set(filePath, contents);
                } else if (recurse && file.isDirectory()) {
                    zk.create(filePath);
                    feedZooKeeper(zk, file, filePath, filenameFilter, recurse);
                }
            }
        }
        catch (IOException e) {
            throw new RuntimeException("Exception feeding ZooKeeper at path " + path, e);
        }
    }
Takes for instance the dir /app  and puts the contents into the given ZK path. Ignores files starting with dot.

@param dir            directory which holds the summary class part files
@param path           zookeeper path
@param filenameFilter A FilenameFilter which decides which files in dir are fed to zookeeper
@param recurse        recurse subdirectories
configserver/src/test/java/com/yahoo/vespa/config/server/zookeeper/ZKApplicationPackageTest.java