code: func FileExists(t TestingT, path string, msgAndArgs ...interface{}) bool {
  	if h, ok := t.(tHelper); ok {
  		h.Helper()
  	}
  	info, err := os.Lstat(path)
  	if err != nil {
  		if os.IsNotExist(err) {
  			return Fail(t, fmt.Sprintf("unable to find file %q", path), msgAndArgs...)
  		}
  		return Fail(t, fmt.Sprintf("error when running os.Lstat(%q): %s", path, err), msgAndArgs...)
  	}
  	if info.IsDir() {
  		return Fail(t, fmt.Sprintf("%q is a directory", path), msgAndArgs...)
  	}
  	return true
  }
docs: // FileExists checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file.