Codebase list golang-github-vbatts-go-mtree / 4733d6f1-0f89-48f7-a687-aecc035232af/main stat_unix.go
4733d6f1-0f89-48f7-a687-aecc035232af/main

Tree @4733d6f1-0f89-48f7-a687-aecc035232af/main (Download .tar.gz)

stat_unix.go @4733d6f1-0f89-48f7-a687-aecc035232af/mainraw · 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)
}