private void writeSchemas(ApplicationPackage app) throws IOException {
            Collection<NamedReader> schemas = app.getSchemas();
            if (schemas.isEmpty()) return;

            Path zkPath = getZooKeeperAppPath(USERAPP_ZK_SUBPATH).append(SCHEMAS_DIR);
            curator.create(zkPath);
            // Ensures that ranking expressions and other files are also written
            writeDir(app.getFile(ApplicationPackage.SEARCH_DEFINITIONS_DIR), zkPath);
            writeDir(app.getFile(ApplicationPackage.SCHEMAS_DIR), zkPath);
            for (NamedReader sd : schemas) {
                curator.set(zkPath.append(sd.getName()), Utf8.toBytes(com.yahoo.io.IOUtils.readAll(sd.getReader())));
                sd.getReader().close();
            }
        }
Writes def files and user config into ZK.

@param app the application package to feed to zookeeper
configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ZooKeeperDeployer.java