How to Overwrite a Project File Using Code?
Is there a way to replace a project file with different data using code? If I have an asset called foo
and try to do this:
system.project.deleteFile("assets/foo", function()
system.project.writeFile("assets/foo", "new content")
end)
I end up with no foo
asset but a foo2
asset containing "new content"
. I have checked, and the foo
asset is gone when writeFile is called. Is there anything I can do to fix this, or is it a MicroStudio bug?