Codebase list golang-github-vbatts-go-mtree / 5bd602f6-34b2-411b-80f3-7d65781fd7d4/upstream stat_unix.go
5bd602f6-34b2-411b-80f3-7d65781fd7d4/upstream

Tree @5bd602f6-34b2-411b-80f3-7d65781fd7d4/upstream (Download .tar.gz)

stat_unix.go @5bd602f6-34b2-411b-80f3-7d65781fd7d4/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)
}