• 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: Why is NSString->FSRef so hard?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is NSString->FSRef so hard?


  • Subject: Re: Why is NSString->FSRef so hard?
  • From: Jim Correia <email@hidden>
  • Date: Thu, 30 Apr 2009 01:11:34 -0400

On Thu, Apr 30, 2009 at 12:02 AM, Charles Srstka
<email@hidden> wrote:
> With that said, I don't really see what is harmful about recommending the
> use of NSString's path concatenation methods, which could save quite a few
> headaches in the case that this *does* somehow change for some bizarre
> reason, however unlikely that may be.

Even if the path separator never changes, they are still beneficial to
use because they automatically handle both the trailing slash present
and trailing slash missing cases transparently

[@"/foo" stringByAppendingPathComponent: @"bar"] -> /foo/bar
[@"/foo/" stringByAppendingPathComponent: @"bar"] -> /foo/bar

- Jim
_______________________________________________

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: 
 >Why is NSString->FSRef so hard? (From: Erg Consultant <email@hidden>)
 >Re: Why is NSString->FSRef so hard? (From: Nick Zitzmann <email@hidden>)
 >Re: Why is NSString->FSRef so hard? (From: Erg Consultant <email@hidden>)
 >Re: Why is NSString->FSRef so hard? (From: "Stephen J. Butler" <email@hidden>)
 >Re: Why is NSString->FSRef so hard? (From: Erg Consultant <email@hidden>)
 >Re: Why is NSString->FSRef so hard? (From: Ken Thomases <email@hidden>)
 >Re: Why is NSString->FSRef so hard? (From: Erg Consultant <email@hidden>)
 >Re: Why is NSString->FSRef so hard? (From: Mark Douma <email@hidden>)
 >Re: Why is NSString->FSRef so hard? (From: Andrew Farmer <email@hidden>)
 >Re: Why is NSString->FSRef so hard? (From: Charles Srstka <email@hidden>)

  • Prev by Date: Re: Changing a custom field editor's position
  • Next by Date: Re: Why is NSString->FSRef so hard?
  • Previous by thread: Re: Why is NSString->FSRef so hard?
  • Next by thread: Re: Why is NSString->FSRef so hard?
  • Index(es):
    • Date
    • Thread