aboutsummaryrefslogtreecommitdiffstats
path: root/src/fs/StandardDirectory.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-03-01 22:50:11 +0100
committerMax Kellermann <max@duempel.org>2014-03-01 22:51:51 +0100
commit36ca57a54ebcbdfb2fa4374378280867a089bb91 (patch)
tree02eca17f29c90d367d9c964f921961fa16f061c1 /src/fs/StandardDirectory.hxx
parentefa6678bcc0cbd6679061809c464c91f06b552ec (diff)
downloadmpd-36ca57a54ebcbdfb2fa4374378280867a089bb91.tar.gz
mpd-36ca57a54ebcbdfb2fa4374378280867a089bb91.tar.xz
mpd-36ca57a54ebcbdfb2fa4374378280867a089bb91.zip
fs/StandardDirectory: add GetUserCacheDir()
Move code from CreateConfiguredDatabase() and add XDG support. This implements an automatic Linux fallback for the setting "db_file" if none was specified.
Diffstat (limited to 'src/fs/StandardDirectory.hxx')
-rw-r--r--src/fs/StandardDirectory.hxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/fs/StandardDirectory.hxx b/src/fs/StandardDirectory.hxx
index dca35b486..e3fba375a 100644
--- a/src/fs/StandardDirectory.hxx
+++ b/src/fs/StandardDirectory.hxx
@@ -33,6 +33,13 @@ AllocatedPath GetUserConfigDir();
*/
AllocatedPath GetUserMusicDir();
+/**
+ * Obtains cache directory for the current user.
+ */
+gcc_pure
+AllocatedPath
+GetUserCacheDir();
+
#ifdef WIN32
/**