From 82561d62b66f17c05604e87f18187bb3a91f00d2 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 2 Jul 2025 21:52:07 +0900 Subject: system: move system access packages These packages loosely belong in the "system" package and "system" provides high level wrappers for all of them. Signed-off-by: Ophestra --- system/acl/perms.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 system/acl/perms.go (limited to 'system/acl/perms.go') diff --git a/system/acl/perms.go b/system/acl/perms.go new file mode 100644 index 00000000..fbc99e82 --- /dev/null +++ b/system/acl/perms.go @@ -0,0 +1,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) +} -- cgit v1.3.1