YAML file utilities.
More...
#include <YamlFile.hpp>
|
| static YamlNode | LoadWithIncludes (const std::string &path) |
| | Load YAML from file with !include directive resolution.
|
| static YamlNode | MergeFiles (const std::vector< std::string > &paths) |
| | Merge multiple YAML files (later files override earlier).
|
| static bool | IsValidYaml (const std::string &path) |
| | Check if file exists and is valid YAML.
|
| static std::vector< std::filesystem::path > | FindYamlFiles (const std::string &directory, bool recursive=false) |
| | Get all YAML files in directory.
|
◆ FindYamlFiles()
| std::vector< std::filesystem::path > vulcan::io::YamlFile::FindYamlFiles |
( |
const std::string & | directory, |
|
|
bool | recursive = false ) |
|
inlinestatic |
Get all YAML files in directory.
◆ IsValidYaml()
| bool vulcan::io::YamlFile::IsValidYaml |
( |
const std::string & | path | ) |
|
|
inlinestatic |
Check if file exists and is valid YAML.
◆ LoadWithIncludes()
| YamlNode vulcan::io::YamlFile::LoadWithIncludes |
( |
const std::string & | path | ) |
|
|
inlinestatic |
Load YAML from file with !include directive resolution.
Example: components: !include components.yaml routes: !include routes/main.yaml
Include paths are relative to the parent YAML file.
◆ MergeFiles()
| YamlNode vulcan::io::YamlFile::MergeFiles |
( |
const std::vector< std::string > & | paths | ) |
|
|
inlinestatic |
Merge multiple YAML files (later files override earlier).
Useful for config layering: base.yaml + env.yaml + local.yaml
The documentation for this class was generated from the following file: