23 #ifndef __ccxx_Permissions_hxx 24 #define __ccxx_Permissions_hxx 110 {
return((_mask & USER_READ) != 0); }
114 { _mask |= USER_READ; }
118 { _mask &= ~USER_READ; }
122 {
return((_mask & USER_WRITE) != 0); }
126 { _mask |= USER_WRITE; }
130 { _mask &= ~USER_WRITE; }
134 {
return((_mask & USER_EXECUTE) != 0); }
138 { _mask |= USER_EXECUTE; }
142 { _mask &= ~USER_EXECUTE; }
148 {
return((_mask & GROUP_READ) != 0); }
152 { _mask |= GROUP_READ; }
156 { _mask &= ~GROUP_READ; }
160 {
return((_mask & GROUP_WRITE) != 0); }
164 { _mask |= GROUP_WRITE; }
168 { _mask &= ~GROUP_WRITE; }
172 {
return((_mask & GROUP_EXECUTE) != 0); }
176 { _mask |= GROUP_EXECUTE; }
180 { _mask &= ~GROUP_EXECUTE; }
186 {
return((_mask & OTHERS_READ) != 0); }
190 { _mask |= OTHERS_READ; }
194 { _mask &= ~OTHERS_READ; }
198 {
return((_mask & OTHERS_WRITE) != 0); }
202 { _mask |= OTHERS_WRITE; }
206 { _mask &= ~OTHERS_WRITE; }
210 {
return((_mask & OTHERS_EXECUTE) != 0); }
214 { _mask |= OTHERS_EXECUTE; }
218 { _mask &= ~OTHERS_EXECUTE; }
241 {
return((_mask = rhs)); }
244 {
return(_mask |= (rhs & ALLBITS)); }
247 {
return(_mask &= (rhs & ALLBITS)); }
271 #endif // __ccxx_Permissions_hxx uint_t operator|=(uint_t rhs)
Definition: Permissions.h++:243
uint_t getMask() const
Get the permissions mask.
Definition: Permissions.h++:230
static const int USER_READ
User read mask.
Definition: Permissions.h++:56
static const int GROUP_WRITE
Group write mask.
Definition: Permissions.h++:74
static const int ALLBITS
Complete permissions mask.
Definition: Permissions.h++:104
static const int GROUP_ALL
Group (all permissions) mask.
Definition: Permissions.h++:83
static const int OTHERS_READ
Others read mask.
Definition: Permissions.h++:86
bool canOthersExecute() const
Test for others execute access.
Definition: Permissions.h++:209
bool canOthersRead() const
Test for others read access.
Definition: Permissions.h++:185
void clearOthersWrite()
Disable others write access.
Definition: Permissions.h++:205
void clearGroupExecute()
Disable group execute access.
Definition: Permissions.h++:179
void setUserExecute()
Enable user execute access.
Definition: Permissions.h++:137
void setOthersExecute()
Enable others execute access.
Definition: Permissions.h++:213
void clearUserRead()
Disable user read access.
Definition: Permissions.h++:117
static const int GROUP_READ_WRITE
Group read and write mask.
Definition: Permissions.h++:77
void setGroupWrite()
Enable group write access.
Definition: Permissions.h++:163
bool canUserWrite() const
Test for user write access.
Definition: Permissions.h++:121
uint_t operator=(uint_t rhs)
Definition: Permissions.h++:240
static const Permissions defaultFilePerms
Default permissions for files: read & write for user, read for group.
Definition: Permissions.h++:250
static const int OTHERS_READ_WRITE
Others read and write mask.
Definition: Permissions.h++:92
static const int ALL_READ_WRITE
All read and write mask.
Definition: Permissions.h++:101
uint_t operator &(const Permissions &perm, const uint_t rhs)
Definition: Permissions.h++:266
unsigned int uint_t
An alias for unsigned int.
Definition: Integers.h++:74
static const int GROUP_EXECUTE
Group execute mask.
Definition: Permissions.h++:80
void setOthersWrite()
Enable others write access.
Definition: Permissions.h++:201
void setGroupRead()
Enable group read access.
Definition: Permissions.h++:151
static const int GROUP_READ
Group read mask.
Definition: Permissions.h++:71
void clearAll()
Disable all access.
Definition: Permissions.h++:221
bool canUserExecute() const
Test for user execute access.
Definition: Permissions.h++:133
void setOthersRead()
Enable others read access.
Definition: Permissions.h++:189
void setGroupExecute()
Enable group execute access.
Definition: Permissions.h++:175
uint_t operator|(const Permissions &perm, const uint_t rhs)
Definition: Permissions.h++:263
void clearUserExecute()
Disable user execute access.
Definition: Permissions.h++:141
bool canGroupRead() const
Test for group read access.
Definition: Permissions.h++:147
static const int OTHERS_WRITE
Others write mask.
Definition: Permissions.h++:89
void clearGroupRead()
Disable group read access.
Definition: Permissions.h++:155
static const int USER_WRITE
User write mask.
Definition: Permissions.h++:59
static const Permissions defaultDirPerms
Default permissions for directories: read, write & execute for user, read & execute for group...
Definition: Permissions.h++:256
void setUserRead()
Enable user read access.
Definition: Permissions.h++:113
bool canUserRead() const
Test for user read access.
Definition: Permissions.h++:109
#define COMMONCPP_API
Definition: Common.h++:126
A flexible, reference counted, copy-on-write, thread-safe, nullable string.
Definition: String.h++:50
static const int OTHERS_ALL
Others (all permissions) mask.
Definition: Permissions.h++:98
static const int USER_EXECUTE
User execute mask.
Definition: Permissions.h++:65
bool canGroupExecute() const
Test for group execute access.
Definition: Permissions.h++:171
bool canOthersWrite() const
Test for others write access.
Definition: Permissions.h++:197
void setUserWrite()
Enable user write access.
Definition: Permissions.h++:125
bool canGroupWrite() const
Test for group write access.
Definition: Permissions.h++:159
File permissions.
Definition: Permissions.h++:38
void clearGroupWrite()
Disable group write access.
Definition: Permissions.h++:167
static const int USER_ALL
User (all permissions) mask.
Definition: Permissions.h++:68
void clearOthersRead()
Disable others read access.
Definition: Permissions.h++:193
void clearOthersExecute()
Disable others execute access.
Definition: Permissions.h++:217
static const int USER_READ_WRITE
User read and write mask.
Definition: Permissions.h++:62
Definition: AllocationMap.c++:25
static const int OTHERS_EXECUTE
Others execute mask.
Definition: Permissions.h++:95
void clearUserWrite()
Disable user write access.
Definition: Permissions.h++:129