• 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: [RESOLVED] [[NSBundle mainBundle] bundlePath] and trailng slashes...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RESOLVED] [[NSBundle mainBundle] bundlePath] and trailng slashes...


  • Subject: Re: [RESOLVED] [[NSBundle mainBundle] bundlePath] and trailng slashes...
  • From: Chase <email@hidden>
  • Date: Mon, 18 Jul 2005 18:23:10 -0500


On Jul 18, 2005, at 6:19 PM, Douglas Davidson wrote:


On Jul 18, 2005, at 4:06 PM, Chase wrote:

the problem is that i'm looking for a path in the com.apple.dock prefs domain and i need to compare it to my bundle path to see if my app is already in the dock. the paths in the dock seem to all have trailing slashes, but i don't want to depend on that, since any user could certainly pop open the plist file and add a pathname that doesn't have a trailing slash.


Unfortunately, path comparison is not necessarily simple. A trailing slash is not the only non-significant change that can be made; there are also issues such as repeated slashes (// is equivalent to /) and the use of dots (/./ is equivalent to /, and then there is also .. to be considered). Symlinks can also confuse the issue, whether or not you wish them to be significant. You can look at the documentation for stringByStandardizingPath et al. for more information on some of the operations available to you.


Douglas Davidson


what about comparing alias datas? that would be more reliable wouldn't it? doesn't that circumvent the symlinks issue?

- chase


_______________________________________________ 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
  • Follow-Ups:
    • Re: [RESOLVED] [[NSBundle mainBundle] bundlePath] and trailng slashes...
      • From: Rosyna <email@hidden>
References: 
 >[[NSBundle mainBundle] bundlePath] and trailng slashes... (From: Chase <email@hidden>)
 >Re: [[NSBundle mainBundle] bundlePath] and trailng slashes... (From: Douglas Davidson <email@hidden>)
 >Re: [RESOLVED] [[NSBundle mainBundle] bundlePath] and trailng slashes... (From: Chase <email@hidden>)
 >Re: [RESOLVED] [[NSBundle mainBundle] bundlePath] and trailng slashes... (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Re: [RESOLVED] [[NSBundle mainBundle] bundlePath] and trailng slashes...
  • Next by Date: NEWBIE - using filepaths in applescript
  • Previous by thread: Re: [RESOLVED] [[NSBundle mainBundle] bundlePath] and trailng slashes...
  • Next by thread: Re: [RESOLVED] [[NSBundle mainBundle] bundlePath] and trailng slashes...
  • Index(es):
    • Date
    • Thread