mirror of
https://github.com/vbatts/go-mtree.git
synced 2024-12-24 14:36:30 +00:00
19 lines
311 B
Go
19 lines
311 B
Go
|
// +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)
|
||
|
}
|