Re: Best way to get a file path for presentation to the user
Re: Best way to get a file path for presentation to the user
- Subject: Re: Best way to get a file path for presentation to the user
- From: Graham Cox <email@hidden>
- Date: Fri, 18 Dec 2015 20:27:46 +1100
Never mind, I just found it: stringByAbbreviatingWithTildeInPath
—Graham
> On 18 Dec 2015, at 8:24 PM, Graham Cox <email@hidden> wrote:
>
> Hi all,
>
> I want to display a path to the user. I have a URL, I need to show the local file path that represents (it’s always a local file path), where the /Users/<username>/ is replaced by ~/
>
> Is there an easy, reliable way to do this, or do I have to do a string search/replace myself? Going the other way is trivial, I know, but I don’t see anything that gives me a displayable path given a URL.
>
> —Graham
>
>
>
> _______________________________________________
>
> 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
_______________________________________________
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