Re: defaults command line tool and multiple plists
Re: defaults command line tool and multiple plists
- Subject: Re: defaults command line tool and multiple plists
- From: Nicholas Riley <email@hidden>
- Date: Thu, 25 Sep 2003 13:43:16 -0500
- Mail-followup-to: mwalker <email@hidden>, Cocoa-Dev <email@hidden>
On Thu, Sep 25, 2003 at 10:22:01AM -0600, mwalker wrote:
>
Hi, all.
>
>
We've got a collection of applications (both Cocoa and Carbon) and
>
command-line tools and daemons (ditto) that create several preference
>
files in /Library/Preferences. We use the standard
>
"com.companyname.toolappname.plist" naming convention for the files,
>
because we're using CFPreferences and NSUserDefaults.
>
>
What we would like to do is, as part of an install perhaps, is
>
manipulate these files from the command line. I was ready to write a
>
custom tool for this, but then I remembered the "defaults" tool, which
>
seemed perfect. However, when I type "defaults domains", I only see the
>
name of the first preferences file (of ours) in the list,
>
"com.companyname.startswithA.plist". Is this a restriction of defaults?
>
Should I just say "to heck with it" and write a custom tool?
>
>
I'd hate to duplicate Apple's work; the tool isn't especially urgent;
>
and I'd like to understand why defaults doesn't work like I expected it
>
to.
You can use an absolute pathname (minus the .plist extension) as a
domain for defaults, so specifying
/Library/Preferences/com.companyname.toolappname should work.
--
=Nicholas Riley <email@hidden> | <
http://www.uiuc.edu/ph/www/njriley>
_______________________________________________
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.