mirror of
https://github.com/vbatts/go-mtree.git
synced 2024-11-22 08:25:38 +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)
|
||
|
}
|