private void writeFile(ApplicationFile file, Path zkPath) throws IOException {
            if ( ! file.exists()) return;

            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            try (InputStream inputStream = file.createInputStream()) {
                inputStream.transferTo(baos);
                baos.flush();
                curator.set(zkPath.append(file.getPath().getName()), baos.toByteArray());
            }
        }
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