func dupFile(f *os.File) (*os.File, error) { … } func openatFile(dir *os.File, path string, flags int, mode int) (*os.File, error) { … } func fstatatFile(dir *os.File, path string, flags int) (unix.Stat_t, error) { … } func readlinkatFile(dir *os.File, path string) (string, error) { … }