[#BloombergLP-bdls-FilePermissions] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdls.adoc[bdls]::FilePermissions :relfileprefix: ../../ :mrdocs: This `struct` provides a namespace for a `std::filesystem::perms`‐style enumeration of file‐system permission bits, and a pair of predicates for validating an `int` bit mask against that enumeration. == Synopsis Declared in `<bdls_filepermissions.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct FilePermissions; ---- == Enums [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdls/FilePermissions/Enum.adoc[`Enum`] | File‐system permission bits, in the conventional Unix octal layout. Values may be combined with the bitwise‐OR operator. See the component‐level documentation for the meaning of each enumerator. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdls/FilePermissions/isValid.adoc[`isValid`] | Return `true` if the specified `permissions` bit mask consists only of bits defined in `Enum` (i.e., bits in `k_MASK`), and `false` otherwise. A negative value always returns `false`. | xref:BloombergLP/bdls/FilePermissions/isValidBaseBits.adoc[`isValidBaseBits`] | Return `true` if the specified `permissions` bit mask consists only of the "base" nine rwx bits (owner/group/others read/write/execute, i.e., bits in `k_ALL`), and `false` otherwise. Note that this predicate is stricter than `isValid`: `k_SET_UID`, `k_SET_GID`, and `k_STICKY_BIT` are rejected. | xref:BloombergLP/bdls/FilePermissions/print.adoc[`print`] | Write the octal numeric representation of the specified permission bit mask `value` to the specified output `stream`, and return a reference to `stream`. Optionally specify an initial indentation `level`, whose absolute value is incremented recursively for nested objects. If `level` is specified, optionally specify `spacesPerLevel`, whose absolute value indicates the number of spaces per indentation level for this and all of its nested objects. If `level` is negative, suppress indentation of the first line. If `spacesPerLevel` is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by `level`). The `value` is written in octal notation _without_ the customary leading `0` prefix (for example, the mask `0640` is written as `640`). |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#