code: func (d *dir) mkdirs(p string) (*dir, error) {
  	p = normalize(p)
  
  	n := d.find(p)
  
  	if !n.isdir() {
  		// Found something there
  		return nil, errIsNotDir
  	}
  
  	if n.path() == p {
  		return n.(*dir), nil
  	}
  
  	dd := n.(*dir)
  
  	relative := strings.Trim(strings.TrimPrefix(p, n.path()), "/")
  
  	if relative == "" {
  		return dd, nil
  	}
  
  	components := strings.Split(relative, "/")
  	for _, component := range components {
  		d, err := dd.mkdir(component)
  
  		if err != nil {
  			// This should actually never happen, since there are no children.
  			return nil, err
  		}
  		dd = d
  	}
  
  	return dd, nil
  }
docs: // mkdirs creates any missing directory entries in p and returns the result.