code: func EnsureFile(fs utilfs.Filesystem, path string) error {
  	// if file exists, don't change it, but do report any unexpected errors
  	if ok, err := FileExists(fs, path); ok || err != nil {
  		return err
  	} // Assert: file does not exist
  
  	// create any necessary parents
  	err := fs.MkdirAll(filepath.Dir(path), defaultPerm)
  	if err != nil {
  		return err
  	}
  
  	// create the file
  	file, err := fs.Create(path)
  	if err != nil {
  		return err
  	}
  	// close the file, since we don't intend to use it yet
  	return file.Close()
  }
docs: // EnsureFile ensures that a regular file exists at `path`, and if it must create the file any
  // necessary parent directories will also be created and the new file will be empty.