mirror of
https://github.com/vbatts/go-mtree.git
synced 2024-11-24 00:55:41 +00:00
19 lines
331 B
Go
19 lines
331 B
Go
//go:build !windows
|
|
// +build !windows
|
|
|
|
package mtree
|
|
|
|
import (
|
|
"os"
|
|
"syscall"
|
|
)
|
|
|
|
func statIsUID(stat os.FileInfo, uid int) bool {
|
|
statT := stat.Sys().(*syscall.Stat_t)
|
|
return statT.Uid == uint32(uid)
|
|
}
|
|
|
|
func statIsGID(stat os.FileInfo, gid int) bool {
|
|
statT := stat.Sys().(*syscall.Stat_t)
|
|
return statT.Gid == uint32(gid)
|
|
}
|