Stop FileAccess from generating Translation and Import files

Godot Version

v4.4.1

Question

Hi all,

I’m exporting a simple .csv file in GDScript, but when I do it generates a whole bunch of other .translation and .import files along with it that I don’t want.

The csv file exports fine, all the data is there, I just want to stop generating these extra files, I just want the csv. It’s also generating some console errors to do with them for some reason, here’s my code, files and console:

I noticed these files aren’t generated when the file saving happens, the csv file generates when the function is called during run time, but as soon as I close the window, that’s when the extra files and errors are generated. I tried googling it, but couldn’t figure it out.

Anyone know a fix? Cheers.

See the comments section in the documentation, especially the comment by Calinou.

(Godot treats .csv files as localization files by default.)

Thank you, that’s something at least (still getting the .import file but I guess that’s built into any file that exists in the Godot “res://” path isn’t it).

Is there a way to do this globally for all csv files instead of any individually named files though? I’m building a simulation program where I want to periodically save multiple files throughout a simulations life time, planning to name the files based on date and time, example:

Say I run a simulation and wanted to save the current state of things every 10 seconds, if a simulation runs for 10 minutes, that’s going to be a whole lot of translation files lol.

I found a solution that works for me, I’m not going to use the “res://” folder, but the “user://” folder instead.

Exporting the exact same way with a “user://” directory doesn’t generate any Translation or Import files. So this might help someone else.

It would still be nice to be able to disable those files when exporting to the “res://” directory though, if anyone does know a solution for this.