Codebase list golang-github-vbatts-go-mtree / 3bbfb842-ba90-4202-990a-06bf66fb8b7f/upstream/0.5.2+ds stat_unix.go
3bbfb842-ba90-4202-990a-06bf66fb8b7f/upstream/0.5.2+ds

Tree @3bbfb842-ba90-4202-990a-06bf66fb8b7f/upstream/0.5.2+ds (Download .tar.gz)

stat_unix.go @3bbfb842-ba90-4202-990a-06bf66fb8b7f/upstream/0.5.2+dsraw · history · blame

//go:build !windows
// +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)
}