append_extension

Function append_extension 

Source
pub fn append_extension<P, E>(path: P, additional_extension: E) -> PathBuf
where P: AsRef<Path>, E: AsRef<str>,
Expand description

Appends specified extension to the path.

ยงExamples

let path = Path::new("foo.bar");
let new_path = append_extension(path, "baz");
assert_eq!(new_path, Path::new("foo.bar.baz"))