Re: prefs directory for current user
Ben Bucksch <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.prefs |
|---|---|
| Organization | Beonex |
| Message-ID | <[email protected]> |
Pawan Joshi wrote: > Inside the Http protocol handler code, I wanted to find out the > preference directory for the current user. E.g. if the user is > "Default", I can call some API which will return > "C:\WINNT\Profiles\Administrator\Application > Data\Mozilla\Profiles\test\ds3ogj4e.slt". I need that API. Check out nsAppDirectoryServiceDefs.h / nsDirectoryServiceDefs.h and the relevant APIs. > Why I need this: > I am making some changes in the protocol Handler and I need to store > the current user's preferences in his/her directory. At startup, I > need to read these files and act accrodingly. You don't need to and should not care about the prefs file, if you need to read or write prefs. That's what nsIPref is for. You'll find plenty of example in the source. But I am wondering, why you want to *set* prefs in the http protocol handler. Ben Bucksch Beonex