• 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: Get path to user preference folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get path to user preference folder


  • Subject: Re: Get path to user preference folder
  • From: Shawn Erickson <email@hidden>
  • Date: Sat, 15 Feb 2003 09:52:07 -0800

On Saturday, February 15, 2003, at 07:21 AM, Daniel Aarno wrote:

How can I retrieve the path to the a users preference folder in the correct manner, i.e how can I get ~/Library/Preferences without hard-coding it in my sources?

Also I must apologize for the multiple posts that are likely to appear here. My e-mail address got screwed up.

What are you attempting to do this?

If to access your apps own preferences then that is done automatically for you if you use the user defaults system (NSUserDefaults). You can also use this, in theory, to access other applications defaults. (or drop down to CFPreferences)

FYI, you can use the command line tool "defaults" as well to probe and change application defaults stored by apps if they use NSUserDefaults or CFPreferences.

You should not assume that application defaults (preferences) will always be stored at "~/Library/Preferences" or any place in flat files.

I would look over http://developer.apple.com/techpubs/macosx/Cocoa/TasksAndConcepts/ ProgrammingTopics/UserDefaults/index.html if you haven't already.

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

  • Prev by Date: Re: Get path to user preference folder, updated
  • Next by Date: ARCHIVING WITH CIRCULAR REFERENCES
  • Previous by thread: Re: Get path to user preference folder
  • Next by thread: Mail.app & Rendezvous
  • Index(es):
    • Date
    • Thread