Re: -[NSURL path] returning empty string for relative file URL
Re: -[NSURL path] returning empty string for relative file URL
- Subject: Re: -[NSURL path] returning empty string for relative file URL
- From: Glen Simmons <email@hidden>
- Date: Fri, 11 Nov 2005 07:45:08 -0600
On Nov 11, 2005, at 7:17 AM, Niko Matsakis wrote:
In "file://foo.bar", the host part is "foo.bar" and the path part is
empty. You probably mean "file:///foo.bar", in which the host
part is
empty and the path part is "/foo.bar".
Well, what I want is a relative path. "/foo.bar" would be an
absolute path. I'm no expert on URLs, so I'm not sure what that
should look like.
A relative URL has no scheme, so it would look like: "foo.bar".
This would work relative to the original resource, whether it was a
file: URL or an http: URL, etc.
Hmm. The problem there is that if I don't put in a scheme, then the
NSURL I get back when the link is clicked in the NSTextView is that
applewebdata thing, which is a bit ... unwieldy.
Glen
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden