|
libnmbs 1.0.0
|
Functionality for the numerous binding profiles of ADatP-4778. More...
Classes | |
| struct | BindingInformation |
| Holds information about both the labels, and the file the labels are bound to. More... | |
Typedefs | |
| typedef std::uint32_t | AccessMode |
| Bitmask type for evaluating file access modes. | |
| typedef std::uint32_t | ProfileSupport |
| Bitmask type for indicating supported ADatP-4778 binding profiles. | |
Enumerations | |
| enum | AccessModeFlags : AccessMode { am_none = 0 , am_read = 1 << 0 , am_write = 1 << 1 } |
| Flags representing read/write access capabilities. More... | |
| enum | ProfileSupportFlags : ProfileSupport { ps_none = 0 , ps_xmp = 1 << 0 , ps_sidecar = 1 << 1 , ps_xml = 1 << 2 , ps_ext4 = 1 << 3 } |
| Flags representing supported binding profiles for a specific file. More... | |
Functions | |
| ProfileSupport | support (const std::filesystem::path &path) |
| File analysis to check the binding capabilities of the path. | |
Functionality for the numerous binding profiles of ADatP-4778.
This namespace holds a number of sub-namespaces relevant to each binding profile. The sub-namespaces each contain a similar set of functions, such as for reading and writing labels using specifically that binding profile.
| typedef std::uint32_t nmbs::binding::AccessMode |
Bitmask type for evaluating file access modes.
| typedef std::uint32_t nmbs::binding::ProfileSupport |
Bitmask type for indicating supported ADatP-4778 binding profiles.
Flags representing supported binding profiles for a specific file.
|
nodiscard |
File analysis to check the binding capabilities of the path.
Using nmbs::binding::ProfileSupportFlags you can use classic binary logic to see which binding profiles could potentially be supported by this file. Note that this ignores rights! For example, sidecar will be reported as supported for files in /etc/... as it is entirely possible that a readonly file can have a sidecar. Users should use the relevant access mode checks to verify if a binding profile has read or write access.
This function is written for speed, but it does perform several IO operations. Care should be taken to cache the result if possible.
| path | The filesystem path to analyse. |