mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
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
|
|
}
|