Codebase list golang-github-vbatts-go-mtree / b37d6dc7-7334-4ece-84e6-4b44d0746757/upstream stat_unix.go
b37d6dc7-7334-4ece-84e6-4b44d0746757/upstream

Tree @b37d6dc7-7334-4ece-84e6-4b44d0746757/upstream (Download .tar.gz)

stat_unix.go @b37d6dc7-7334-4ece-84e6-4b44d0746757/upstreamraw · 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)
}