
On Fri, Jul 11, 2008 at 14:11, Loïc Joly <loic.actarus.joly@numericable.fr> wrote:
I'd like to know if there is in boost::filesystem a way to "resolve" a path. For instance, I have a path that is built from : "c:\foo1\foo2\..\bar1\bar2"
And I'd like to obtain: "c:\foo1\bar1\bar2"
As I recall, that used to be called canonize, but it seems to have disappeared. There are still references to it, though, such as "Move canonize() and normalize() to convenience.hpp?" in the do list, and "Symbolic links cause canonical and normal form of some paths to represent different files or directories. For example, given the directory hierarchy /a/b/c, with a symbolic link in /a named x pointing to b/c, then under POSIX Pathname Resolution rules a path of "/a/x/.." should resolve to "/a/b". If "/a/x/.." were first normalized to "/a", it would resolve incorrectly. (Case supplied by Walter Landry.)" in the design rationale. (It'd be nice to have to make uncomplete easy to write, too.)