Open akberc opened 11 years ago
Well, C:\Users\x\git\x\x\config
is not a valid URI, so you can't parse it as one.
OK. Makes sense. I should add a scheme.
A scheme plus a path should result in a URI, but is there a quick way to convert the path segments and separators?
You should add a scheme and turn it into a URI: file:///c:/Users/x/git/x/x/config
.
I guess we need to add a way to convert paths to URIs in the SDK.
If you're OK I'll edit this issue to reflect the fact that we're missing a feature?
Thank, please do.
Adding a scheme to a normalized (not platform specific) path should result in a URI.
And hopefully, if a scheme is not provided, it should choose the JVM default filesystem scheme.
With the existing uriString
, works fine as below.
variable String configURI = getBootProperty("config.store",xHome.absolutePath.childPath("config").uriString);
configURI = configURI.replace("{x.home}", xHome.uriString);
We should be able to turn a
Path
into aUri
and vice-versa. We need to take special care for Windows platforms and the drive roots.