Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2002-09-17 04:57:33


William Kempf wrote:
> The formal review for the Filesystem Library starts today and ends Sept.
> 23. I'm the review manager, and Beman Dawes is the submitter.
> Guidelines on forma reviews can be found at
> http://www.boost.org/more/formal_review_process.htm.

Beman,
I have some questions at the moment.

1. Say I have a path. I want to treat it as relative to some other
directory, if it is relative. That is, I want function

     path root ( const path& p, const path& r )

which will work like

     root ( "/home/ghost/a" , "/home/ghost" ) = "/home/ghost/a"
     root ( "a" , "/home/ghost" ) = "/home/ghost/a"

How can I do that? I seems rather hard currently -- I see no way to join
two paths and I see no way to tell if a path is relative.

2. I haven't found any treatment of relative paths in docs. It appears
that they are accepted and treated relatively to the current dir, but
isn't relying on current dir considered bad? How can I avoid it, if I
can't implement the function 'root' above?

- Volodya


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk