Re: Preferences, Authorization, Writing files
Re: Preferences, Authorization, Writing files
- Subject: Re: Preferences, Authorization, Writing files
- From: Lorenzo Puleo <email@hidden>
- Date: Fri, 07 Feb 2003 09:31:16 +0100
Hi,
you have to save your preference files in
(Home)/Library/Preferences
so, each current user will save/read his own preferences to/from his
personal own folder.
To get the current user's Preferences folder:
pathFolderPref = [[NSHomeDirectory()
stringByAppendingPathComponent:@"Library"]stringByAppendingPathComponent:@"P
references"];
To "go" to the several Home folder:
/Users/userName/
Hope this help.
Bye
Lorenzo Puleo
>
Hi developers,
>
>
I've a problem that bugs me for a while now.
>
>
1) a preferences pane in /Library/PreferencePanes, this is for
>
administrators and creates a data file in /Library/Application Support
>
>
2) the rights are rwxrwxr-x for /Library and for /Library/Application
>
Support
>
>
3) I now use the preferences pane as administrator and the data get
>
saved as for example mypref.data (NSArchiver is used here)
>
>
4) If I now log in as a normal user and use the prefs pane I see my
>
save data
>
>
5) Now I change some settings and want to overwrite the existing data
>
but this will fail, since a normal user has no write access
>
to the directories mentioned above. But even with authentication
>
services (which rights shall I obtain?) and an admin user name
>
password the NSArchive operation failed. What am I doing wrong here?
>
>
Thanks for your help and ideas.
--
Lorenzo Puleo
mailto:email@hidden
_______________________________________________
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.