Codebase list golang-github-vbatts-go-mtree / 6d8c66b5-711c-45a1-bada-6cbbdc95535e/main stat_unix.go
6d8c66b5-711c-45a1-bada-6cbbdc95535e/main

Tree @6d8c66b5-711c-45a1-bada-6cbbdc95535e/main (Download .tar.gz)

stat_unix.go @6d8c66b5-711c-45a1-bada-6cbbdc95535e/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)
}