code: func DirExists(fs Fs, path string) (bool, error) {
  	fi, err := fs.Stat(path)
  	if err == nil && fi.IsDir() {
  		return true, nil
  	}
  	if os.IsNotExist(err) {
  		return false, nil
  	}
  	return false, err
  }
docs: // DirExists checks if a path exists and is a directory.