I have a file that needs to be deleted to clear it, but it simply does not get deleted. The error result I get is '1' (Generic Error).
The 'commented out' lines are things I've tried, but none of them worked either.
func delete_gj_dat() -> void:
var dir := Directory.new()
dir.open(OS.get_user_data_dir()) #<- Commented Out
dir.open("user://") #<- Commented Out
dir.remove("gj.dat") #<- Commented Out
I've stepped through the code, and it definitely reaches this code. I have the same issue with another file in my project.
Apologies if it's something obvious, or something I didn't read.