• 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: Finder-like conversion of a fileURL to 'user-friendly' path
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finder-like conversion of a fileURL to 'user-friendly' path


  • Subject: Re: Finder-like conversion of a fileURL to 'user-friendly' path
  • From: Tony Romano <email@hidden>
  • Date: Thu, 01 Jul 2010 11:17:23 -0700

NSFileManager's mountedVolumeURLsIncludingResourceValuesForKeys:options will give you the names of the volumes. Use this plus the path to build your own version of the a display string. Remember to use the localized names. However, as Mike suggested, if you are displaying this in the UI, use the NSPathControl.

-Tony


On 7/1/10 10:58 AM, Rainer Standke wrote:
That helps, to get rid of the 'file://localhost' part. What about the addition of the drive name?

Thanks,

Rainer

On Jul 1, 2010, at 10:33 , Kevin Wojniak wrote:

Use -[NSURL path] to get the unix-style path format.


On Jul 1, 2010, at 10:29 AM, Rainer Standke wrote:

At the bottom of each finder window there is a 'path' display that indicates the path to the directory represented by the window. I'd like to be able to convert a path like this one: 'file://localhost/Users/rainer/Desktop/S&S material/hidden/' to some like: 'MacHD/Users/rainer/Desktop/S&S material/hidden'.

I have pieced some things together myself, but the whole thing is a mess. Is there a way to access the same mechanism the Finder is obviously using?

Thanks,

Rainer_______________________________________________

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



_______________________________________________

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: 
 >Finder-like conversion of a fileURL to 'user-friendly' path (From: Rainer Standke <email@hidden>)
 >Re: Finder-like conversion of a fileURL to 'user-friendly' path (From: Kevin Wojniak <email@hidden>)
 >Re: Finder-like conversion of a fileURL to 'user-friendly' path (From: Rainer Standke <email@hidden>)

  • Prev by Date: Re: Finder-like conversion of a fileURL to 'user-friendly' path
  • Next by Date: Re: KVO question
  • Previous by thread: Re: Finder-like conversion of a fileURL to 'user-friendly' path
  • Next by thread: Re: Finder-like conversion of a fileURL to 'user-friendly' path
  • Index(es):
    • Date
    • Thread