code: func FileOrDirExists(path string) (exists bool, isDir bool) {
  	fi, err := os.Stat(path)
  	if err != nil {
  		return false, false
  	} else {
  		return true, fi.IsDir()
  	}
  }
docs: // FileOrDirExists determines if a file/dir exists, returns IsDir() results too.