[fpc-pascal] GetAppConfigDir but for temp data?
Michael Van Canneyt
michael at freepascal.org
Wed Dec 3 13:40:45 CET 2008
On Wed, 3 Dec 2008, Graeme Geldenhuys wrote:
> GetAppConfigDir(False) returns a directory location where local config
> information about an application can be store. Is there one for local
> data? Or is the recommendation (from FreeDesktop.org or Microsoft
> etc..) that it's okay to use the local config directory for data as
> I have an app that creates a database to store collected information
> and input from the user. I would normally not associate that as a
> "config" file, but rather "data". I currently use the config directory
> for things like "last opened file", "last user search", window
> positions etc... that I consider "config" information, but not the
> local database.
> I believe Microsoft has a LocalAppData location, but not sure if that
> is also used for GetAppConfigDir(False).
Yes it is.
> For example: freedesktop.org (I believe) specifies the following file:
> Which on my system contains the following information. Unfortunately
> it doesn't have something as clear as "application data" location,
> though I might consider XDG_DOCUMENTS_DIR as a suitable location.
> eg: $XDG_DOCUMENTS_DIR/<appname>/[data goes here]
Well, on my system this file does not exist.
It's not so easy to find a good compromise.
I was already not very happy about the change to use ~/.config/appname
instead of .appname.
The fact that the freedesktop.org specs are not very binding, doesn't
make it very suitable in my eyes. I'd rather use the 'established'
unix customs of using ~/.appname and e.g. /tmp or so.
But I am open for suggestions.
More information about the fpc-pascal