![]() |
Conventions for Application Data storage
Today's Code177 asks Noobish development questions question is:
What are the conventions for storing application data? For example, say I have an application and I wish to store two types of data:
So - configuration data - where does it go? Additionally, are there any permissions concerns that must be overcome in order to do this? Thanks! |
Re: Conventions for Application Data storage
Interesting question I think.
Up so far, I've been using "pseudostandard" ~/apps/<app name> dir, but I think it was just a camera app invention and nothing really standardized. For "user-hidden" data, I'd say you better follow XDG Base Directory spec (as on Linux desktop): http://standards.freedesktop.org/bas...ec-latest.html Basically, ~/.local/share for "big data files", ~/.config for config files, and ~/.cache for "stuff that doesn't make things go amiss when deleted", like, well, cache files, thumbnails, etc.. As for user visible data, the adequate MyDocs folder. |
Re: Conventions for Application Data storage
Excellent information!
So would it be correct to assume that the app will have sufficient privileges to create/destroy new files and directories within the above directories? |
Re: Conventions for Application Data storage
Quote:
Depending on what you are doing and if you need it backed up you can either use; ~/.yourapp or ~/MyDocs/YourApp The "." makes the directory hidden. I believe the stuff in ~/MyDocs is backed up in a SSU update. Nathan |
Re: Conventions for Application Data storage
Awesome! thanks guys :)
|
Re: Conventions for Application Data storage
Please keep also in mind http://wiki.maemo.org/Documentation/...opt_and_MyDocs
|
| All times are GMT. The time now is 10:01. |
vBulletin® Version 3.8.8