code: func EnsureDir(fs utilfs.Filesystem, path string) error {
  	// if dir exists, don't change it, but do report any unexpected errors
  	if ok, err := DirExists(fs, path); ok || err != nil {
  		return err
  	} // Assert: dir does not exist
  
  	// create the dir
  	return fs.MkdirAll(path, defaultPerm)
  }
docs: // EnsureDir ensures that a directory exists at `path`, and if it must create the directory any
  // necessary parent directories will also be created and the new directory will be empty.