mirror of
https://github.com/vbatts/go-mtree.git
synced 2024-11-05 00:15:58 +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)
|
||
|
}
|