docs: protected boolean checkParentDirs(String path, boolean createIfAbsent) throws IOException {
        String[] components = Util.components(path, SEPARATOR);
        if (components == null)
           return false;
        if (components.length == 1) // no parent directories to create, e.g. "data.txt"
           return true;
  
        StringBuilder sb = new StringBuilder();
        boolean first = true;
  
        for (int i = 0; i < components.length - 1; i++) {
           String tmp = components[i];
           if (!tmp.equals(SEPARATOR)) {
              if (first)
                 first = false;
              else
                 sb.append(SEPARATOR);
           }
           sb.append(tmp);
           String comp = sb.toString();
           if (comp.equals(SEPARATOR))
              continue;
           Metadata val = exists(comp);
           if (val != null) {
              if (val.isFile())
                 throw new IOException(format("cannot create %s as component %s is a file", path, comp));
           } else if (createIfAbsent) {
              metadataCache.put(comp, new Metadata(0, System.currentTimeMillis(), chunkSize, Metadata.DIR));
           } else {
              // Couldn't find a component and we're not allowed to create components!
              return false;
           }
  
        }
        // check that we have found all the components we need.
        return true;
     }