Codebase list golang-github-vbatts-go-mtree / debian/0.4.2-1 stat_unix.go
debian/0.4.2-1

Tree @debian/0.4.2-1 (Download .tar.gz)

stat_unix.go @debian/0.4.2-1raw · 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)
}