Codebase list golang-github-vbatts-go-mtree / 2cae30a5-97aa-4493-9210-c5d88e104ad8/main stat_unix.go
2cae30a5-97aa-4493-9210-c5d88e104ad8/main

Tree @2cae30a5-97aa-4493-9210-c5d88e104ad8/main (Download .tar.gz)

stat_unix.go @2cae30a5-97aa-4493-9210-c5d88e104ad8/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)
}