Proposal for std.path replacement
Nick Sabalausky
a at a.a
Sat Mar 5 23:15:15 PST 2011
"Andrej Mitrovic" <andrej.mitrovich at gmail.com> wrote in message
news:mailman.2230.1299375838.4748.digitalmars-d at puremagic.com...
>I dunno, maybe I'd prefer an enum.
>
> enum path : string { current = ".", up = ".." };
>
> main() { string newPath = join("C:", "Windows", "Subdir", path.up,
> path.up, "Program Files");
> newPath == r"C:\Windows\Subdir\..\..\Program Files";
>
> This is just nitpicking however. And 'current' is only used on Linux
> afaik? :)
>
Windows has always had the '.' meaning "current directory". Even early
versions of MS-DOS had it.
More information about the Digitalmars-d
mailing list