AFIO  v2.00 late alpha
afio_v2_xxx::path_discovery::discovered_path Struct Reference

A discovered path. More...

#include "path_discovery.hpp"

Public Types

enum  source_type {
  source_type::unknown, source_type::local, source_type::environment, source_type::system,
  source_type::hardcoded
}
 Source of the discovered path. More...
 

Public Attributes

path_view path
 
enum afio_v2_xxx::path_discovery::discovered_path::source_type unknown
 
optional< stat_tstat
 

Detailed Description

A discovered path.

Member Enumeration Documentation

◆ source_type

Source of the discovered path.

Enumerator
unknown 

This path comes from an unknown source.

local 

This path was added locally.

environment 

This path came from an environment variable (an override?).

system 

This path came from querying the system.

hardcoded 

This path came from an internal hardcoded list of paths likely for this system.

44  {
45  unknown, //!< This path comes from an unknown source.
46  local, //!< This path was added locally.
47  environment, //!< This path came from an environment variable (an override?).
48  system, //!< This path came from querying the system.
49  hardcoded //!< This path came from an internal hardcoded list of paths likely for this system.
50  } source{source_type::unknown};

Member Data Documentation

◆ path

path_view afio_v2_xxx::path_discovery::discovered_path::path

The path discovered.

◆ stat

optional<stat_t> afio_v2_xxx::path_discovery::discovered_path::stat

If this path was successfully probed for criteria verification, this was its stat after any symlink derefencing at that time. Secure applications ought to verify that any handles opened to the path have the same st_ino and st_dev as this structure before use.


The documentation for this struct was generated from the following file: