relative-path
relative-path copied to clipboard
Add `to_path_normalized`
I have a ../foo
RelativePathBuf
and a /bar
std::PathBuf
. I'd like to be able to get /foo
out of it, without calling Path::canonicalize
(which is a failable syscall). Perhaps adding a to_path_normalized
with this semantics would work?
Mentoring notes:
This would require implementing a version of relative_traversal
that works with a mix of path::Component
and relative_path::Component
over a PathBuf
instance.
Anyone who is interested in normalization might also want to go and shout in rust-lang/rust#47402 since that would supersede the need to do it in this crate.