File permissions.cxx#

Functions

Permissions::AccessRights applyLowerPermissions(const Permissions::AccessRights &rights)#

Return a set of access rights where the lower permissions have been updated so that they reflect higher permissions (e.g., read permission will be set in all cases where write permission was set).

std::string replaceAll(const std::string &str, const std::string &from, const std::string &to)#
std::ostream &operator<<(std::ostream &os, const Permissions &permissions)#

Write a string-representation of the permissions to an IO stream. This is useful for allowing permission data to be stored in Options objects.

std::istream &operator>>(std::istream &is, Permissions &permissions)#

Read a string representation of permissions from an IO stream. This is useful for allowing permissions data to be retrieved from Options objects. Note that there is undefined behaviour if the input is corrupted; an exception may be thrown or the permissions that are read may be incomplete.