On Thu, Apr 30, 2009 at 12:02 AM, Charles Srstka
<cocoa...@charlessoft.com> 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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to