This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Persistent cache-directory with KStandardDirs?

Tags: None
(comma "," separated)
dreamCatalyst
Registered Member
Posts
1
Karma
0
Hi all,

I haven't done any 'real' KDE development before so please excuse me if I'm asking something obvious here.

For an application I'm writing I want to use a QNetworkDiskCache. Obviously the cache needs a directory for it to write files to. I've looked at the KStandardDirs documentation but how I'm reading it it would appear that KStandardDirs can only be used for files, not directories.

How would I go about creating and referencing a directory with KStandardDirs? I can't imagine I'm not missing something here.

/pre-emptive-facepalm
edit: title typo
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
I would suggest using KStandardDirs::findDirs in this case, passing the type as "tmp" and supplying the directory name as reldir. Note that it doesn't have to exist already I believe.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft