Bug 6147 – file scheme uri from file path and vice versa

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-06-11T08:29:00Z
Last change time
2015-01-25T17:42:21Z
Assigned to
nobody
Creator
alienballance

Comments

Comment #0 by alienballance — 2011-06-11T08:29:31Z
It would be useful to have it built in with phobos. I believe it's quite common and generic pattern, so people wouldn't have to inverse slashes conditionally on windows (+glue of course).
Comment #1 by andy — 2015-01-25T17:42:21Z
This question isn't very specific, I'm not sure what's being asked for. "file scheme uri" sound like: file://c:\bob.txt --> c:\bob.txt but the comment says "have to inverse slashes", which sounds like: c:\bob.txt --> c:/bob.txt First, windows, in most operations can use either slash. auto f = File("c:\bob.txt") auto f = File("c:/bob.txt") should both work. Second, there is std.path.buildNormalizedPath, and the doc for std.path documents several other spots where different slashes are respected. I'm guessing that was commit here: https://github.com/D-Programming-Language/phobos/commit/6364506918446fb62816f92ac621a71bff88dbdf?diff=unified I'm gonna close this, but please re-open if I've misunderstood the question. (And maybe you could post some samples of what you're looking for)