• 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: path vs. filename..
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: path vs. filename..


  • Subject: Re: path vs. filename..
  • From: Uli Kusterer <email@hidden>
  • Date: Sun, 29 Oct 2006 12:35:08 +0100

Am 26.10.2006 um 04:28 schrieb Mark Manes:
Before I roll my own--is there a class method that I can use that will allow me to separate a path from a filename? For example when I use NSOpenPanel and use the filename method -- I can a fully qualified path to the file including the filename. I want to pull the path away. Do I just do some nice string manipulation to do what I want or is there a better considered way?

For the archives: If you want to *display* the path or filename instead of just use it, use displayNameAtPath: and componentsToDisplayForPath:. They're in NSFileManager. Otherwise you won't get the correct localized file names on foreign systems, and the colons and slashes will be swapped compared to how the Finder displays them, and the disk name will be missing.


Cheers,
-- M. Uli Kusterer
http://www.zathras.de


_______________________________________________ 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
References: 
 >path vs. filename.. (From: Mark Manes <email@hidden>)

  • Prev by Date: Re: (RS)What's the type of a selector?[2]
  • Next by Date: Re: App menubar dead
  • Previous by thread: Re: path vs. filename..
  • Next by thread: NSTimer's heavy on MIPS?
  • Index(es):
    • Date
    • Thread