libnmbs 1.0.0
Loading...
Searching...
No Matches
nmbs::binding Namespace Reference

Classes

struct  BindingInformation
 The structure representing the XML Binding structure. More...

Typedefs

typedef std::uint32_t AccessMode
typedef std::uint32_t ProfileSupport

Enumerations

enum  AccessModeFlags : AccessMode { am_none = 0 , am_read = 1 << 0 , am_write = 1 << 1 }
enum  ProfileSupportFlags : ProfileSupport {
  ps_none = 0 , ps_xmp = 1 << 0 , ps_sidecar = 1 << 1 , ps_xml = 1 << 2 ,
  ps_ext4 = 1 << 3
}

Functions

ProfileSupport support (const std::filesystem::path &path)
 File analysis to check the binding capabilities of the path.

Typedef Documentation

◆ AccessMode

typedef std::uint32_t nmbs::binding::AccessMode

◆ ProfileSupport

typedef std::uint32_t nmbs::binding::ProfileSupport

Enumeration Type Documentation

◆ AccessModeFlags

Enumerator
am_none 
am_read 
am_write 

◆ ProfileSupportFlags

Enumerator
ps_none 

The file does not support ADatP-4774 labels (at least in this implementation...).

Since
1.0.0
ps_xmp 

The file supports the XMP binding profile.

Since
1.0.0
ps_sidecar 

The file supports the Sidecar binding profile.

Since
1.0.0
ps_xml 

The file supports the XML binding profile.

Since
1.0.0
ps_ext4 

The file supports the EXT4 binding profile.

Since
1.0.0

Function Documentation

◆ support()

ProfileSupport nmbs::binding::support ( const std::filesystem::path & path)
nodiscard

File analysis to check the binding capabilities of the path.

Using nmbs::binding::ProfileSupportFlags you can then 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" function checks to verify if a binding profile has e.g. read or write access.

This function is written for speed, but it does necessarily perform several IO operations. Care should be taken to cache the result if possible.

Since
1.0.0
Parameters
pathto analyse
Returns
nmbs::binding::flags containing all information about the path parameter