Adding Import & Export functionality globally

Godot Version

4.4.1

Question

Hey everyone,
I recently stumbled across Pixelorama, and I want to add the file save and load functionality it has. However, I can’t seem to find how they managed to make it such that you can select a file from anywhere on your computer, rather than being restricted to the res:// and user:// directories.

Even after extensively looking through their GitHub trying to figure out how they did it, I can’t pin down what makes it work. Any help would be appreciated.

I believe the “magic” happens under the Import.gd script. Or at least that’s where I found a reference to a resource being loaded directly from a directory.

Is this what you are looking for?

If you are using a FileDialog then you can change FileDialog.access to Access.ACCESS_FILESYSTEM to be able to navigate the whole filesystem.