开发者

Class name for unix-like permission object

开发者 https://www.devze.com 2022-12-20 10:43 出处:网络
I have a class to store unix-like permissions for user, group and other.开发者_StackOverflow社区 In principle it is a limited access control list but I don\'t want to name it ACL, because usually an A

I have a class to store unix-like permissions for user, group and other.开发者_StackOverflow社区 In principle it is a limited access control list but I don't want to name it ACL, because usually an ACL is something different.

The class looks basically like this:

class X {
  boolean userRead, userWrite, userExecute;
  boolean groupRead, groupWrite, groupExecute;
  boolean otherRead, otherWrite, otherExecute;
}

How to name a class like this? What is the name in Unix?


Often for such questions, the answer is in the question. I would call it Permissions with a comment above saying "Unix-like permissions for user, group, and other".


It looks like it deals strictly with file permissions, so what about calling it FilePermissions?


1) PermissionStatus
2) st_mode see http://www.gnu.org/s/libc/manual/html_node/Permission-Bits.html#Permission-Bits


I'd go with class permission_bits { }, probably in a package unix.

0

精彩评论

暂无评论...
验证码 换一张
取 消