code: public void deleteChildren(String path, boolean recursive) throws IOException {
      List<String> childNames = null;
      try {
        childNames = registryOperations.list(path);
      } catch (PathNotFoundException e) {
        return;
      }
      for (String childName : childNames) {
        String child = join(path, childName);
        registryOperations.delete(child, recursive);
      }
    }
docs: Delete the children of a path -but not the path itself.
  It is not an error if the path does not exist
  @param path path to delete
  @param recursive flag to request recursive deletes
  @throws IOException IO problems