pub fn with_added_extension<'a>(
path: &'a Path,
extension: &str,
) -> Cow<'a, Path>Expand description
Append an extension to a PathBuf.
Unlike Path::with_extension, this function does not replace an existing extension.
If there is no file name, the path is returned unchanged.
This mimics the behavior of the unstable Path::with_added_extension method.