code: func isFile(p string) bool {
  	// TODO(maruel): Is it faster to open the file or to stat it? Worth a perf
  	// test on Windows.
  	i, err := os.Stat(p)
  	return err == nil && !i.IsDir()
  }
docs: // isFile returns true if the path is a valid file.