Copying Files to system.DocumentsDirectory

Hello,

I am having problems with saving score and highscore. I have found a way for it but for that to work I need to copy score.txt and highscore.txt to the system.DocumentsDirectory / sandbox folder.

I currently have both of these files in my game folder with other assets. How can I check to see if these files exists their? if they don’t copy/move from here ? Thanks

This tutorial:

https://coronalabs.com/blog/2015/05/19/tutorial-initializing-a-writable-sqlite-database-from-a-read-only-database/

while written to help move SQL databases from system.ResourceDirectory to system.DocumentsDirectory will work for any file you need to copy out of system.ResourceDirectory and install in system.DocumentsDirectory.

Rob

Thanks, I will have a look into this

This tutorial:

https://coronalabs.com/blog/2015/05/19/tutorial-initializing-a-writable-sqlite-database-from-a-read-only-database/

while written to help move SQL databases from system.ResourceDirectory to system.DocumentsDirectory will work for any file you need to copy out of system.ResourceDirectory and install in system.DocumentsDirectory.

Rob

Thanks, I will have a look into this