Boost logo

Boost :

From: Matthias Troyer (troyer_at_[hidden])
Date: 2002-12-16 13:56:00


On Monday, December 16, 2002, at 06:41 PM, Beman Dawes wrote:

> At 12:12 PM 12/16/2002, Glen Knowles wrote:
>
> >I think what he might be asking for is something like:
> >
> >make /my/full/path relative to /my/base/dir produces ../../full/path
>
> Ah... Thanks...
>
> The practical problem is determining if two paths are the same. What
> if the example was rewritten:
>
> make /My/full/path relative to /my/base/dir
>
> or
>
> make /foo/full/path relative to /my/base/dir
>
> Note that on some operating systems, "/foo" may be the same directory
> as "My".
>
> Is there a reliable way on all operating systems to tell if two
> textually different paths represent the same underlying directory or
> file?
>
> It would be easy for a Filesystem Library user to write a convenience
> function subject to the limitation it only considers lexically
> identity. I've always felt that is misleading and error prone. For
> safety, you really would have to have an operating system function
> that answers the question "do these two paths represent the same
> entity?"

Thanks Beman. I understand your reluctance to add this to the library
and will implement it as a "library user convenience function" if I
need it.

Best regards,

Matthias


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