file_util_non_posix.go 236 B

123456789101112
  1. // +build linux darwin freebsd netbsd openbsd plan9 solaris zos
  2. package util
  3. import (
  4. "os"
  5. "syscall"
  6. )
  7. func GetFileUidGid(fi os.FileInfo) (uid, gid uint32) {
  8. return fi.Sys().(*syscall.Stat_t).Uid, fi.Sys().(*syscall.Stat_t).Gid
  9. }