I'm coding in lua and I have json files that the user can add to that will load into my app using a usb cord, but I wanted them to be able to delete json files from the app as well. It loads the json using this code: json.decodeFile(filePath)
and when I run this
print("File exists? "..tostring(playdate.file.exists(summary.filePath))) it says that file exists.... but if I run this
playdate.file.delete(summary.filePath, false) it doesn't actually delete the file and so I tried to run it again without the file extension
playdate.file.delete(summary.filePath:gsub("%.json$", ""), false) and that doesn't work as well.
I've tried this on the simulator and also on the device. It doesn't return any errors or anything. Anyone have any ideas? All these files are stored in files directory inside the pdx. An example of a file path is files/file.json