Path as an object in std.path
Walter Bright
newshound2 at digitalmars.com
Thu Jun 6 10:27:28 PDT 2013
On 6/6/2013 9:23 AM, Michel Fortin wrote:
> Actually, there is one portable representation for paths: URLs. More
> specifically "file:" URLs if we're limiting ourselves to filesystem paths.
> Relative URLs should probably count too.
That doesn't work for case sensitivity/insensitivity differences, nor does it
work for drive letters like "C:" (which don't exist on Apple systems, hence they
can afford to dismiss them).
In D source code, we deal with this with the convention that package and module
names must be lower case. But there's no getting around the fact that "File" and
"file" are different paths under Windows, and are the same under Linux.
There is no generic abstraction to account for that - the programmer must be
aware of it and adjust as appropriate for his application.
More information about the Digitalmars-d
mailing list