[fpc-pascal] GetAppConfigDir but for temp data?

Graeme Geldenhuys graemeg.lists at gmail.com
Wed Dec 3 13:35:25 CET 2008


Hi,

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
well?

eg:
 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).

For example: freedesktop.org (I believe) specifies the following file:
 $HOME/.config/user-dirs.dirs
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]

Any suggestions?

------------------------[ user-dirs.dirs ]-------------------------------
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
#
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/downloads/unsorted"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"
-------------------------------[  end  ]-----------------------------


Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/



More information about the fpc-pascal mailing list