mirror of https://github.com/k3s-io/k3s
16 lines
269 B
Go
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
|
||
|
}
|