• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Best way to get a file path for presentation to the user
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Best way to get a file path for presentation to the user (From: Graham Cox <email@hidden>)

  • Prev by Date: Best way to get a file path for presentation to the user
  • Next by Date: Re: output string like a teleprinter (NSTextView)
  • Previous by thread: Best way to get a file path for presentation to the user
  • Next by thread: Re: Best way to get a file path for presentation to the user
  • Index(es):
    • Date
    • Thread