From: joel de guzman (djowel_at_[hidden])
Date: 2002-01-27 23:49:31
----- Original Message -----
From: "Jesse Jones" :
> Aren't paths an implementation detail? What about OS's now and in the
> future that deprecate paths? I don't see why we can't create a higher
> level class that works just as well as a path-centric class, but also
> works well on the Mac OS.
Exactly! That's why I suggested conversion to and from a standard well
defined format such as a URI (Universal Resource Identifier). It is an
implementation detail how a platform might do that. We don't have to
care whether the separator is a '\', a ':' or whatever. From the client's
point of view, she is seeing and manipulating a common path format
regardless of what platform she is working on. Behind the scenes, this
common path format is then converted to and from the underlying platform
format, but the client does not care about that.
This "path" abstraction should also hold additional meta-info such as its
type (possibly using MIME instead of platform specific ".xxx" extensions),
its size, date created/modified etc.
This is what I've done before and the scheme worked like a charm for all
platforms where it was deployed. Needs more work though, but the extra
work is all worth it in the end. Hey, works over the internet too!
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk