|
libcommonc++
0.7
|
#include <Permissions.h++>

Public Member Functions | |
| Permissions (uint_t mask=0) | |
| Construct a new Permissions object with the given mask. More... | |
| Permissions (const Permissions &other) | |
| Copy constructor. More... | |
| ~Permissions () | |
| Destructor. More... | |
| bool | canUserRead () const |
| Test for user read access. More... | |
| void | setUserRead () |
| Enable user read access. More... | |
| void | clearUserRead () |
| Disable user read access. More... | |
| bool | canUserWrite () const |
| Test for user write access. More... | |
| void | setUserWrite () |
| Enable user write access. More... | |
| void | clearUserWrite () |
| Disable user write access. More... | |
| bool | canUserExecute () const |
| Test for user execute access. More... | |
| void | setUserExecute () |
| Enable user execute access. More... | |
| void | clearUserExecute () |
| Disable user execute access. More... | |
| bool | canGroupRead () const |
| Test for group read access. More... | |
| void | setGroupRead () |
| Enable group read access. More... | |
| void | clearGroupRead () |
| Disable group read access. More... | |
| bool | canGroupWrite () const |
| Test for group write access. More... | |
| void | setGroupWrite () |
| Enable group write access. More... | |
| void | clearGroupWrite () |
| Disable group write access. More... | |
| bool | canGroupExecute () const |
| Test for group execute access. More... | |
| void | setGroupExecute () |
| Enable group execute access. More... | |
| void | clearGroupExecute () |
| Disable group execute access. More... | |
| bool | canOthersRead () const |
| Test for others read access. More... | |
| void | setOthersRead () |
| Enable others read access. More... | |
| void | clearOthersRead () |
| Disable others read access. More... | |
| bool | canOthersWrite () const |
| Test for others write access. More... | |
| void | setOthersWrite () |
| Enable others write access. More... | |
| void | clearOthersWrite () |
| Disable others write access. More... | |
| bool | canOthersExecute () const |
| Test for others execute access. More... | |
| void | setOthersExecute () |
| Enable others execute access. More... | |
| void | clearOthersExecute () |
| Disable others execute access. More... | |
| void | clearAll () |
| Disable all access. More... | |
| Permissions & | operator= (const Permissions &other) |
| Assignment operator. More... | |
| uint_t | getMask () const |
| Get the permissions mask. More... | |
| operator uint_t () | |
| Cast operator. More... | |
| String | toString () const |
| Get a String representation of the permissions mask. More... | |
| uint_t | operator= (uint_t rhs) |
| uint_t | operator|= (uint_t rhs) |
| uint_t | operator &= (uint_t rhs) |
Static Public Attributes | |
| static const int | USER_READ = S_IRUSR |
| User read mask. More... | |
| static const int | USER_WRITE = S_IWUSR |
| User write mask. More... | |
| static const int | USER_READ_WRITE = (S_IRUSR | S_IWUSR) |
| User read and write mask. More... | |
| static const int | USER_EXECUTE = S_IXUSR |
| User execute mask. More... | |
| static const int | USER_ALL = (S_IRUSR | S_IWUSR | S_IXUSR) |
| User (all permissions) mask. More... | |
| static const int | GROUP_READ = S_IRGRP |
| Group read mask. More... | |
| static const int | GROUP_WRITE = S_IWGRP |
| Group write mask. More... | |
| static const int | GROUP_READ_WRITE = (S_IRGRP | S_IWGRP) |
| Group read and write mask. More... | |
| static const int | GROUP_EXECUTE = S_IXGRP |
| Group execute mask. More... | |
| static const int | GROUP_ALL = (S_IRGRP | S_IWGRP | S_IXGRP) |
| Group (all permissions) mask. More... | |
| static const int | OTHERS_READ = S_IROTH |
| Others read mask. More... | |
| static const int | OTHERS_WRITE = S_IWOTH |
| Others write mask. More... | |
| static const int | OTHERS_READ_WRITE = (S_IROTH | S_IWOTH) |
| Others read and write mask. More... | |
| static const int | OTHERS_EXECUTE = S_IXOTH |
| Others execute mask. More... | |
| static const int | OTHERS_ALL = (S_IROTH | S_IWOTH | S_IXOTH) |
| Others (all permissions) mask. More... | |
| static const int | ALL_READ_WRITE |
| All read and write mask. More... | |
| static const int | ALLBITS = (USER_ALL | GROUP_ALL | OTHERS_ALL) |
| Complete permissions mask. More... | |
| static const Permissions | defaultFilePerms |
| Default permissions for files: read & write for user, read for group. More... | |
| static const Permissions | defaultDirPerms |
| Default permissions for directories: read, write & execute for user, read & execute for group. More... | |
File permissions.
Permissions consist of read, write, and execute access for each of user (owner), group, and others (everyone), and are represented efficiently as a mask.
| Permissions | ( | uint_t | mask = 0 | ) |
Construct a new Permissions object with the given mask.
| mask | The permissions mask. |
| Permissions | ( | const Permissions & | other | ) |
Copy constructor.
| ~Permissions | ( | ) |
Destructor.
|
inline |
Test for group execute access.
|
inline |
Test for group read access.
|
inline |
Test for group write access.
|
inline |
Test for others execute access.
|
inline |
Test for others read access.
|
inline |
Test for others write access.
|
inline |
Test for user execute access.
|
inline |
Test for user read access.
|
inline |
Test for user write access.
|
inline |
Disable all access.
|
inline |
Disable group execute access.
|
inline |
Disable group read access.
|
inline |
Disable group write access.
|
inline |
Disable others execute access.
|
inline |
Disable others read access.
|
inline |
Disable others write access.
|
inline |
Disable user execute access.
|
inline |
Disable user read access.
|
inline |
Disable user write access.
|
inline |
Get the permissions mask.
|
inline |
Cast operator.
Returns the permissions mask.
| Permissions & operator= | ( | const Permissions & | other | ) |
Assignment operator.
|
inline |
Enable group execute access.
|
inline |
Enable group read access.
|
inline |
Enable group write access.
|
inline |
Enable others execute access.
|
inline |
Enable others read access.
|
inline |
Enable others write access.
|
inline |
Enable user execute access.
|
inline |
Enable user read access.
|
inline |
Enable user write access.
|
static |
All read and write mask.
|
static |
Complete permissions mask.
|
static |
Default permissions for directories: read, write & execute for user, read & execute for group.
|
static |
Default permissions for files: read & write for user, read for group.
|
static |
Group (all permissions) mask.
|
static |
Group execute mask.
|
static |
Group read mask.
|
static |
Group read and write mask.
|
static |
Group write mask.
|
static |
Others (all permissions) mask.
|
static |
Others execute mask.
|
static |
Others read mask.
|
static |
Others read and write mask.
|
static |
Others write mask.
|
static |
User (all permissions) mask.
|
static |
User execute mask.
|
static |
User read mask.
|
static |
User read and write mask.
|
static |
User write mask.