Closed noamraph closed 2 months ago
Thanks for the suggestion! "absolute" can mean several things depending on the context. The closest thing currently supported is canonicalize
and the related canonicalize_utf8
.
In general camino follows Rust's Path
API, so I'd be hesitant to add methods that aren't already in Rust's Path
. But you're welcome to have your own function, of course.
I now see I didn't mention the standard Rust API. I meant to follow's Rust's std::path::absolute, without inventing any new API. Does that seem like a good idea?
Oh, gotcha! Yeah that makes sense then.
This is now out in camino 1.1.9. Thanks for the issue!
I'll be happy to try to write a PR if you approve of the idea.
Ohhh I just noticed this, sorry! I'd love a future contribution from you if you ever have an idea. Thanks!
Ohhh I just noticed this, sorry! I'd love a future contribution from you if you ever have an idea. Thanks!
Thanks! Really no problem, it would surely have taken longer if I had tried to implement it. For example, I wouldn't have thought of adding the Rust version check. So thanks for adding this so quickly!
Currently in order to get the absolute path of a Utf8Path, it seems that I need to do:
How about adding an
absolute()
function to camino?I'll be happy to try to write a PR if you approve of the idea.
Thanks! Noam