Function openrr::client::resolve_relative_path [−][src]
pub fn resolve_relative_path<B, P>(
base_path: B,
path: P
) -> Result<PathBuf, Error> where
P: AsRef<Path>,
B: AsRef<Path>,
Expand description
Make relative path into absolute path from base file (not base dir).
Example
use std::path::PathBuf; let abs_path = openrr_client::resolve_relative_path("/home/a/base_file.toml", "../another_file.mp3").unwrap(); assert_eq!(abs_path, PathBuf::from("/home/a/../another_file.mp3"));