Codebase list golang-github-vbatts-go-mtree / 5b87f407-68e8-43dd-a59f-5ecc3b3e85b8/main stat_unix.go
5b87f407-68e8-43dd-a59f-5ecc3b3e85b8/main

Tree @5b87f407-68e8-43dd-a59f-5ecc3b3e85b8/main (Download .tar.gz)

stat_unix.go @5b87f407-68e8-43dd-a59f-5ecc3b3e85b8/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)
}