I’m building an application that is targeting Windows, Mac and Linux soon. I was wondering where should I keep application data such as settings, etc.
Application’s installation folder is the easiest choice, but I think that might be a problem with new Vista security model. Besides, users might want different settings.
Is it C:\Documents and Settings\username\MyApp good for both Vista and XP? Is it /home/username/.MyApp good for Linux and Macs?
Any ideas and/or links to best practices much appreciated.
Thanks!
Juan
Each platform has its own API for finding the user’s home folder, or documents folder, or preferences folder.
Don’t hardcode specific paths or just tack a prefix and suffix on the user’s name. Also, try to follow whatever conventions there are for the platform for naming the files.