Codebase list golang-github-vbatts-go-mtree / e9c91572-fbfa-47cf-bc70-c15effeb0253/upstream stat_unix.go
e9c91572-fbfa-47cf-bc70-c15effeb0253/upstream

Tree @e9c91572-fbfa-47cf-bc70-c15effeb0253/upstream (Download .tar.gz)

stat_unix.go @e9c91572-fbfa-47cf-bc70-c15effeb0253/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)
}