k3s/vendor/github.com/lxc/lxd/shared/util_unix.go
2019-11-10 04:05:59 +00:00

16 lines
269 B
Go

// +build !windows
package shared
import (
"os"
"syscall"
)
func GetOwnerMode(fInfo os.FileInfo) (os.FileMode, int, int) {
mode := fInfo.Mode()
uid := int(fInfo.Sys().(*syscall.Stat_t).Uid)
gid := int(fInfo.Sys().(*syscall.Stat_t).Gid)
return mode, uid, gid
}