• 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: to get handle to "File/1.jpg"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: to get handle to "File/1.jpg"


  • Subject: Re: to get handle to "File/1.jpg"
  • From: Gregory Weston <email@hidden>
  • Date: Wed, 26 Nov 2008 19:40:19 -0500

Stefan Werner wrote:

Actually, it's probably not, because HFS can't store a file with a
":" in
it, but can store a file with a "/" in it. But the UNIX stuff means
much of
the OS can't handle a file with a "/" in it, so it gets mapped to
":" for
the OS. But some Mac APIs can't handle the ":" so that gets mapped
back to
"/".

Ideally, code should not even be aware of what the path separator is. Always use the system provided methods to concatenate and split paths (NSURL, CFURL, NSString, FSRefs), then your code couldn't care less if 10.7 should introduce HFS++Extreme with 'e' as path separator.

Ideally, that's true. And a key element of that is to make sure you're consistent about which API you're using. But you also may need to do some scrubbing if, for example, there's any chance of the user entering filename information directly.
_______________________________________________


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


  • Prev by Date: Re: Which Mac models use the new 64-bit Objective-C ABI?
  • Next by Date: Re: Newbie question: Object as input arguments
  • Previous by thread: Re: to get handle to "File/1.jpg"
  • Next by thread: Multiple NSTableViews in one NSScrollView
  • Index(es):
    • Date
    • Thread