Page 1 of 1
specialFolderPath("Preferences") for window
Posted: Thu Jul 14, 2011 10:19 am
by jmburnod
Hi All,
Which is the equivalent of specialFolderPath("Preferences") for window and Linux
I think "home" it is correct ?
Al the best
Jean-Marc
Re: specialFolderPath("Preferences") for window
Posted: Thu Jul 14, 2011 11:22 am
by SparkOut
"home" would be pretty much the equivalent of the "home" folder reference on a Mac. If that is suitable then yes, you could use it. Otherwise if you are talking more like the "asup" application support folder in the user's libraray, then on Windows at least you would probably find the nearest match is to use specialFolderPath(26) or specialFolderPath(28) for the Application Data folder, whether roaming or local. I don't know what any equivalent in Linux would be.
The dictionary gives a link to the Microsoft site which tells what they are (which seems currently to be down), but Ken Ray has the specialFolderPath Codes "bible" here
http://www.sonsothunder.com/devres/revo ... ile010.htm
Re: specialFolderPath("Preferences") for window
Posted: Thu Jul 14, 2011 11:42 am
by jmburnod
Hi Sparkout,
Thank for your quick and documented reply.
All the best
Jean-Marc
Re: specialFolderPath("Preferences") for window
Posted: Thu Jul 14, 2011 8:16 pm
by jacque
Actually, specialFolderPath("preferences") works on Windows. It points to the right place in the user data folder.
On Linux it is customary to just use ~/.myapp/ (don't use specialFolderPath.) The dot makes the app folder invisible, which is usually how apps do it.
Re: specialFolderPath("Preferences") for window
Posted: Thu Jul 14, 2011 8:37 pm
by SparkOut
jacque wrote:Actually, specialFolderPath("preferences") works on Windows. It points to the right place in the user data folder.
If that were true, it would be nice if the dictionary said so. But it certainly doesn't give me a path on Windows (7 - not tested on any other versions lately but I'm pretty sure I never got a path from attempts to try "preferences" back on my XP machine when I was green).
Re: specialFolderPath("Preferences") for window
Posted: Thu Jul 14, 2011 9:31 pm
by jacque
Hmm...looks like you're right. I just checked some old code and I'm using specialFolderPath(26) for Windows. I hate when I do that.

Re: specialFolderPath("Preferences") for window
Posted: Thu Jul 14, 2011 10:17 pm
by FourthWorld
Re: specialFolderPath("Preferences") for window
Posted: Thu Jul 14, 2011 11:50 pm
by SparkOut
Aye, me too, as intimated above.
Re: specialFolderPath("Preferences") for window
Posted: Fri Jul 15, 2011 10:19 am
by jmburnod
Hi All,
Thank for reply.
They are very useful for a windows baby and i'am one.
All the best
Jean-Marc