Codebase list golang-github-vbatts-go-mtree / 77f5491e-3a23-49b7-b573-678497ec993b/main stat_unix.go
77f5491e-3a23-49b7-b573-678497ec993b/main

Tree @77f5491e-3a23-49b7-b573-678497ec993b/main (Download .tar.gz)

stat_unix.go @77f5491e-3a23-49b7-b573-678497ec993b/mainraw · history · blame

// +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)
}