From: Scott McMurray (me22.ca+boost_at_[hidden])
Date: 2008-05-29 13:36:31
On Thu, May 29, 2008 at 1:06 PM, Martin Wille <mw8329_at_[hidden]> wrote:
> Sorry for the bikeshedding, but I really don't like parent_path. The
> problem I see is related to symbolic links. "parent" suggests a parent
> directory, even though parent_path() might return something that is not
> the parent directory of a link target. I think the naming should reflect
> the fact that we're operating on names only, not on an actual filesystem
> structure. So, IMHO, "basename" is a better choice than anything
> containing "parent".
> So, "basename()" and "parent_of()" should be considered operations on
> different domains (path names vs filesystem).
I'd say the problem you mention needs only be considered in the
filesystem case where you have the interpretation of a path as
referring to a symlink. If we're just considering the path, then the
parent of the path /x/right1/right2/bar is /x/right1/right2. If you
want the filesystem interpretation, then you want
path("/x/right1/right2/bar")/"..", which will act equivalently to /x
in operation functions.
I think, as a decomposition function, the name parent is sufficiently clear.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk