Page 1 of 1

Best Folder to store Apps Database

Posted: Sat Apr 04, 2020 10:42 pm
by hrcap
Evening All

I hope that you are all well and safe.

I have an app which works on both desktop and mobile.

When on mobile the app currently builds its SQLite database in the following location

specialfolderpath (cache) & "/Applications/app_name/Data/Databases/app_name.sqlite"

This has worked fine up until recently... but now that my phones memory is coming close to full the phone is purging the cache folder every so often and as such my apps DB gets deleted.

I'm going to change the location that the DB is stored in but before I do I thought I would ask for advice here to ensure I get the folder location correct, so which of the special folder path folders should I store the DB in?

- home
- documents
- library
- temporary
- engine
- resources


Many Thanks

Re: Best Folder to store Apps Database

Posted: Sun Apr 05, 2020 1:31 pm
by Klaus
It is definitvely -> specialfolderpath("documents")

Re: Best Folder to store Apps Database

Posted: Sun Apr 05, 2020 2:17 pm
by hrcap
Thank you very much Klaus

Saves me making another beginners error that remains undiscovered until a later date.


Many Thanks and enjoy the sunshine