@Override
    public void check(Curator curator, TransactionChanges changes) {
        int lastSlash = path.lastIndexOf("/");
        if (lastSlash < 0) return; // root; ok
        String parent = path.substring(0, lastSlash);
        if ( ! parent.isEmpty() && ! curator.exists(Path.fromString(parent)) && ! changes.create(parent))
            throw new IllegalStateException("Cannot perform " + this + ": Parent '" + parent + "' does not exist");
        changes.addCreate(path);
    }
ZooKeeper create operation.

@author Ulf Lilleengen
@author bratseth
zkfacade/src/main/java/com/yahoo/vespa/curator/transaction/CuratorCreateOperation.java