Saving files to specific locations

I’m using sixth form computers for creating my game, however this means that using sys.get_save_file puts the path into a folder that I can’t access through the file explorer. Is it useful to have access to the file outside of Defold, and if it is can I pick where the file gets saved to.

Thank you

Hi! As long as defold has access to that file to load, you probably don’t ever need to see it with your own eyes. And it’s better to use the location chosen depending on your OS specifically for that purpose.

More info

3 Likes

Thanks, this is one of the most important parts of my project so its a big help

Let us know if you have any more questions and good luck!

You could also use Lua’s io module to read and write data to files to other areas on the user’s device (though take into consideration that different platform directories are going to look different). It’s already on Defold, so you don’t have to download anything.

This one is more useful for when you want to save and load raw data such as images or text/code files, as sys.save() and sys.load() only save and load Lua tables.

Some additional information here: Working with files