Issue
I'm building an app with Pyside. Part of what the app does is download some xml files from a website and store them for later use. For example, every time the program is started it checks for these directories and, if they cannot be found, downloads the xml files, creates new directories, and stores the files in them. I'm wondering if there is some compelling reason not to allow the program to create new directories (permissions, security, etc.) and, if so, what other options exist?
EDIT: To be clear, I'll need to read and write to these directories and possibly create new ones as new files appear on the webpage.
Solution
Almost all programs need to write to config and/or cache directories. The only thing you need to worry about is making sure you use the appropriate platform-specific locations for doing this. Do not use an arbitrary, application-specific directory.
In Qt4, the QDesktopServices class can be used to determine the correct storage locations, or in Qt5, there's the QStandardPaths class.
Answered By - ekhumoro
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.