Codebase list golang-github-vbatts-go-mtree / 8feeab77-98f0-4ffb-a3fc-f435f67cd7f2/main stat_unix.go
8feeab77-98f0-4ffb-a3fc-f435f67cd7f2/main

Tree @8feeab77-98f0-4ffb-a3fc-f435f67cd7f2/main (Download .tar.gz)

stat_unix.go @8feeab77-98f0-4ffb-a3fc-f435f67cd7f2/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)
}