Get list of files in the files folder

Greetings. I wonder if we can have some kind of advanced file system expression/functions where we can get a list of JSON files from a specified directory.

For example, in my game’s executable folder, there is a “Save Data” folder I created. The contents inside that folder contained my game’s JSON save files.

So, specific to my game, I’d love if the GDevelop 5 engine is capable of returning a list of JSON save files in my “Save Data” folder into a (possibly) scene variable array.

Scan the specified directory [Insert target path here] for JSON files > JSON file name contains [Insert string here] > Convert JSON to Scene Variable.

So later on I can create something like this:


(Image: Age of Empires 2 Load screen UI)

With this feature implemented, if players were to copy/paste a save file into the “Save Data” folder, when the game boots up, it will automatically show up in the Load screen in-game.

This will be tremendously useful so players don’t have to overwrite existing save files.

I’d appreciate it if you can put this in the GDevelop 5 feature reviews. Thank you very much!

3 Likes