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
.
精彩评论