Proposal for std.path replacement
Jonathan M Davis
jmdavisProg at gmx.com
Sat Mar 5 17:56:06 PST 2011
On Saturday 05 March 2011 17:43:50 Andrej Mitrovic wrote:
> 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?
> :)
I have no idea what's used on Windows. I rarely use it these days.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list