Reputation: 13975
I have the following url as a string
/Users/username/Documents/
and I need to convert it to
file:///localhost/Users/username/Documents/
So I can use it as a path argument in an NSOpenPanel. But I can't figure out how to do it? Is there any method? I know how to go from absolute -> normal, but not the other way around.
Upvotes: 0
Views: 175
Reputation: 429
You need fileURLWithPath like this:
[NSURL fileURLWithPath:@"/Users/username/Documents/"];
Upvotes: 5