Codebase list golang-github-vbatts-go-mtree / bd45743a-c878-4d01-97da-094c1925934b/main stat_unix.go
bd45743a-c878-4d01-97da-094c1925934b/main

Tree @bd45743a-c878-4d01-97da-094c1925934b/main (Download .tar.gz)

stat_unix.go @bd45743a-c878-4d01-97da-094c1925934b/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)
}