• 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: FindFolder() and Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FindFolder() and Cocoa


  • Subject: Re: FindFolder() and Cocoa
  • From: "Erik M. Buck" <email@hidden>
  • Date: Mon, 27 Jan 2003 17:26:10 -0500

Is there a problem with NSSearchPathForDirectoriesInDomains() ?

See
http://developer.apple.com/techpubs/macosx/Cocoa/TasksAndConcepts/Programmin
gTopics/LowLevelFileMgmt/Tasks/LocatingDirectories.html

Apple's documentation mentions FSFindFolder() on the same page. Is there any
reason to prefer one over the other ?

<OT RANT -- Skip if you are offended by rants>
I personally like to avoid all of the conversions between FSRef. -> CFURL ->
CFString -> NSString required by the Carbon APIs. This drives me crazy when
using QuickTime. There are more lines of code dedicated to converting
between FSRefs and NSStrings than there are "useful" lines. From my very
limited perspective regarding Carbon vs. Cocoa, all of the opaque type
conversions required to use Carbon make Carbon seen very clunky, slow, error
prone, and low code density. I understand the "need" for FSRef in the
context of the historical Mac universe, but standards like POSIX exist for a
reason and the "Mac" way seems archaic and non-standard to me. For worse or
better, paths are the "standard" portable way to identify files particularly
when you don't know (can't assume) the file system being accessed (as is the
case on Mac OS X). If we can't even agree how to access/identify files at
the lowest application code level, portability is hopeless IMHO.

POSIX paths may be lowest common denominator, but years of use has proven
them adequate on every platform including (or except) Mac...
<END RANT that you should have ignored if you are offended by my aesthetic
judgments that I do not ask or require others to endorse. If you must reply
to the rant part, please reply personally and don't reply on-list>
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: FindFolder() and Cocoa
      • From: Daniel Jalkut <email@hidden>
  • Prev by Date: Small font issue
  • Next by Date: Re: Small font issue
  • Previous by thread: Re: FindFolder() and Cocoa
  • Next by thread: Re: FindFolder() and Cocoa
  • Index(es):
    • Date
    • Thread