• 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
Application Support Folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Application Support Folder


  • Subject: Application Support Folder
  • From: Anthony Smith <email@hidden>
  • Date: Wed, 24 Jun 2009 00:02:54 -0400

I'm beginning to delve into Core Data and I've been looking at the generated code for the Xcode Core Data project. I'm finding their implementation of -applicationSupportFolder interesting. They grab the NSApplicationSupportDirectory using NSSearchPathForDirectoriesInDomains, which makes sense, but then they go on to do a check to make sure the directory was retrieved looking at the item count in the returned NSArray. If count is not greater than 0 then it returns an NSTemporaryDirectory. What's the point? Is that check really necessary? Will there ever be an instance where NSSearchPathForDirectoriesInDomains will not return the NSApplicationSupportDirectory when asked for? If so, why and what would be the appropriate way to handle this?

Anthony

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

  • Follow-Ups:
    • Re: Application Support Folder
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Setter Getter on NSImageVIew / UIImageView?
  • Next by Date: Re: UML Diagramming or Other Helpful Software
  • Previous by thread: Re: Setter Getter on NSImageVIew / UIImageView?
  • Next by thread: Re: Application Support Folder
  • Index(es):
    • Date
    • Thread