pub fn resolve_include_path(
parent_path: impl AsRef<Path>,
include_path: impl AsRef<Path>,
) -> PathBufExpand description
Resolves an include path relative to the file that declared it.
Absolute include paths are only normalized. Relative include paths are joined
to the parent directory of parent_path and then normalized.
§Arguments
parent_path: Path of the config file that declared the include.include_path: Include path declared byparent_path.
§Returns
Returns the normalized resolved include path.
§Examples
use std::path::PathBuf;
use rust_config_tree::resolve_include_path;
let path = resolve_include_path("/app/config/root.yaml", "child/server.yaml");
assert_eq!(path, PathBuf::from("/app/config/child/server.yaml"));