|
Boost : |
From: Glen Knowles (gknowles_at_[hidden])
Date: 2002-12-16 12:12:33
From: Beman Dawes [mailto:bdawes_at_[hidden]]
> > While doing so one missing function
> >came to my mind (or did I just overlook it). It came to my mind that
> >some time in the future I might want to create a relative path, given a
> >"complete" path and a "complete" reference directory. Is there such a
> >"make_relative" function? Would it be hard to add? Note that I do not
> >ned it at this time and there is thus no hurry. I am mostly curious if
> >others might have similar needs, and how hard it would be to add it?
>
>Have you looked at path::relative_path()?
>
>You could use it like this:
>
> a.root_path() / b.relative_path()
>
>To compose a new bath based on a's root information and b's relative
>information. Or did I misunderstand what you needed?
I think what he might be asking for is something like:
make /my/full/path relative to /my/base/dir produces ../../full/path
Glen
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk