//go:build unix package provider import ( "os" "syscall" ) // singleLink reports whether a file has one name only. func singleLink(info os.FileInfo) bool { st, ok := info.Sys().(*syscall.Stat_t) return ok && st.Nlink == 1 } // ownedHere reports whether root or this user owns an entry. func ownedHere(info os.FileInfo) bool { st, ok := info.Sys().(*syscall.Stat_t) return ok && (st.Uid == 0 || int(st.Uid) == os.Geteuid()) } // ownGroup reports whether an entry's group is this user's own. func ownGroup(info os.FileInfo) bool { st, ok := info.Sys().(*syscall.Stat_t) return ok && int(st.Gid) == os.Getegid() }