FROM : Erik M. Buck
DATE : Mon Jan 27 23:26:10 2003
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_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
DATE : Mon Jan 27 23:26:10 2003
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_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| chris corbell | Jan 27, 19:37 | |
| Douglas Davidson | Jan 27, 20:31 | |
| Finlay Dobbie | Jan 27, 20:46 | |
| Erik M. Buck | Jan 27, 23:26 | |
| Daniel Jalkut | Jan 28, 16:25 | |
| chris corbell | Jan 28, 21:07 | |
| Daniel Jalkut | Jan 31, 04:43 |






Cocoa mail archive

