std::filesystem::perm_options (3) - Linux Manuals
std::filesystem::perm_options: std::filesystem::perm_options
NAME
std::filesystem::perm_options - std::filesystem::perm_options
Synopsis
Defined in header <filesystem>
enum class perm_options {
replace = /* unspecified */,
add = /* unspecified */, (since C++17)
remove = /* unspecified */,
nofollow = /* unspecified */
};
This type represents available options that control the behavior of the function permissions().
perm_options satisfies the requirements of BitmaskType (which means the bitwise operators operator&, operator|, operator^, operator~, operator&=, operator|=, and operator^= are defined for this type)
Member constants
At most one of add, remove, replace may be present, otherwise the behavior of the permissions function is undefined.
Member constant Meaning
replace Permissions will be completely replaced by the argument to permissions() (default behavior)
add permissions will be replaced by the bitwise OR of the argument and the current permissions
remove permissions will be replaced by the bitwise AND of the negated argument and current permissions
nofollow permissions will be changed on the symlink itself, rather than on the file it resolves to
Example
// Run this code
Possible output:
See also
permissions modifies file access permissions
(C++17)
perms identifies file system permissions