Where can I store plasmoid user data?

I am new to KDE. I wrote a plasmoid that needs to store its data somewhere, namely: ical feeds need to be stored for offline use.

While I could just write it in ~ / .ical / or some other place that I would do, I would like to know what the correct way is - is there an API that I can request about a way to store personal data?

+3
source share
1 answer

I got a response to the KDE forums :

, KStandardDirs KDEHOME ( "" ).

, :

    def getDataPath(self, *parts):
        main_dir = str(KStandardDirs.locateLocal("data", "gcal-agenda"))
        dirs = [main_dir] + list(parts)
        return os.path.join(*dirs)

"gcal-Agenda" - .

+4

Source: https://habr.com/ru/post/1774707/


All Articles