Re: Root URL and URLByDeletingLastPathComponent
Re: Root URL and URLByDeletingLastPathComponent
- Subject: Re: Root URL and URLByDeletingLastPathComponent
- From: email@hidden
- Date: Sun, 17 Jul 2016 09:49:52 -0400
Hi,
On Jul 17, 2016, at 6:30 AM, Mike Abdullah <email@hidden> wrote:
> It might be a mishandling of the two sorts of rot URL. If you try feeding in this URL manually:
>
> file://localhost/
>
> and removing the last component, what do you end up with?
That just treats it as a file called "localhost" in the current directory.
NSURL *rootURL = [NSURL fileURLWithPath:@"localhost"];
NSLog(@"%@", rootURL.path);
NSLog(@"%@", [rootURL URLByDeletingLastPathComponent].path);
Output:
2016-07-17 09:47:06.867 RootURLTest[88149:5248066] /Users/demitri/Library/Developer/Xcode/DerivedData/RootURLTest-fbffessbrdfkihacrrlbhzzsoumv/Build/Products/Debug/localhost
2016-07-17 09:47:06.868 RootURLTest[88149:5248066] /Users/demitri/Library/Developer/Xcode/DerivedData/RootURLTest-fbffessbrdfkihacrrlbhzzsoumv/Build/Products/Debug
Demitri
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden