file/info.go
func (i *info) OwnerHas(p ...perm) bool {
	mode := i.fi.Mode()

	for _, v := range p {
		switch v {
		case R:
			if mode&modeROwner == 0 {
				return false
			}
		case W:
			if mode&modeWOwner == 0 {
				return false
			}
		case X:
			if mode&modeXOwner == 0 {
				return false
			}
		}
	}
	return true
}
func (i *info) OwnerHas(p ...perm) bool {
	mode := i.fi.Mode()

	for _, v := range p {
		switch v {
		case R:
			if mode&modeROwner == 0 {
				return false
			}
		case W:
			if mode&modeWOwner == 0 {
				return false
			}
		case X:
			if mode&modeXOwner == 0 {
				return false
			}
		}
	}
	return true
}
func ( i * info ) OwnerHas ( p ... perm ) bool { mode := i . fi . Mode ( ) for _ , v := range p { switch v { case R : if mode & modeROwner == 0 { return false } case W : if mode & modeWOwner == 0 { return false } case X : if mode & modeXOwner == 0 { return false } } } return true }
// OwnerHas reports whether the owner has all given permissions.
OwnerHas reports whether the owner has all given permissions .