Adds a new normalize method to both Path and Utf8Path alongside is_parent and is_current methods on Component and Utf8Component traits.
The normalize method will resolve . and .. with .. being removed if the path is relative and there is nothing else to resolve.
This can potentially be used to address #8 by determining if an existing path is relative and - if so - prepending the current working directory as a path and then normalizing it. The trick is figuring out how to take a platform-specific path and convert it to the proper encoding, or just not caring about that.
Adds a new
normalize
method to bothPath
andUtf8Path
alongsideis_parent
andis_current
methods onComponent
andUtf8Component
traits.The
normalize
method will resolve.
and..
with..
being removed if the path is relative and there is nothing else to resolve.This can potentially be used to address #8 by determining if an existing path is relative and - if so - prepending the current working directory as a path and then normalizing it. The trick is figuring out how to take a platform-specific path and convert it to the proper encoding, or just not caring about that.