• 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: Daniel Jalkut <email@hidden>
  • Date: Tue, 28 Jan 2003 07:25:47 -0800

On Monday, January 27, 2003, at 02:26 PM, Erik M. Buck wrote:

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 ?


Probably just depends on how you're "used to getting things done". Being more familiar with FindFolder, I will speak to some of its advantages/differences. I'm sure the traditional NS "way" has some good ones, too. FindFolder is much more specific about what directory in particular you are looking for (I mean, there are simply many more "constants" defined for passing to FindFolder). So for those who are concerned with not "hard-coding" a path, the FindFolder approach can eliminate almost of all of that for even some of the lesser used folder types. Take a look in Folders.h (CoreServices) for a listing of what's available.

You can use FindFolder to find some folders within the configured "Classic" Mac OS 9 folder ("classic domain"). As far as I know it's the only API which provides a service like that.

Finally FindFolder has an option for creating the folder if it doesn't exist, and upon creating certain folders, will make certain adjustments to them (make them invisible, change permissions, etc) as appropriate for the folder type.. As far as I know the NS API is purely exploratory (probably for the best, IMO).

Daniel
_______________________________________________
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.

References: 
 >Re: FindFolder() and Cocoa (From: "Erik M. Buck" <email@hidden>)

  • Prev by Date: Re: Drawing gradients in views
  • Next by Date: RE: dealloc strangeness in my custom view
  • Previous by thread: Re: FindFolder() and Cocoa
  • Next by thread: Re: FindFolder() and Cocoa
  • Index(es):
    • Date
    • Thread