system.project.writeFile( "assets/generated/jsonfile",...) does not update file but creates new
the writeFile function generates a new file when i try to rewrite a file like
system.project.writeFile( "assets/generated/jsonfile", obj, object ext = "json" end, function(result, error) print(result) end )
system.project.writeFile( "assets/generated/jsonfile", obj, object ext = "json" end, function(result, error) print(result) end )
system.project.writeFile( "assets/generated/jsonfile", obj, object ext = "json" end, function(result, error) print(result) end )
that will lead to 3 files called jsonfile, jsonfile2, jsonfile3
please add an updateFile function that will overwrite a file, or change the behavior of the writeFile function that it overwrites the file by given path and not generating some new ones