seaweedfs/weed/util/file_util_non_posix.go

14 lines
322 B
Go
Raw Normal View History

2021-09-01 09:45:42 +00:00
//go:build linux || darwin || freebsd || netbsd || openbsd || plan9 || solaris || zos
// +build linux darwin freebsd netbsd openbsd plan9 solaris zos
package util
import (
"os"
"syscall"
)
func GetFileUidGid(fi os.FileInfo) (uid, gid uint32) {
return fi.Sys().(*syscall.Stat_t).Uid, fi.Sys().(*syscall.Stat_t).Gid
}