aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/acl/perms.go
blob: fbc99e829874e0247f63ae4b33b118aff12b698d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package acl

type Perms []Perm

func (ps Perms) String() string {
	var s = []byte("---")
	for _, p := range ps {
		switch p {
		case Read:
			s[0] = 'r'
		case Write:
			s[1] = 'w'
		case Execute:
			s[2] = 'x'
		}
	}
	return string(s)
}