As AP’s Lua does not have os
available, is there a way to remove a file on the SD card from a lua script (i.e. one that was created by the same script with io.open()
)? The less-preferred alternative is to open and truncate the file at the start, leaving a file size of 0.
In the meantime there is a LUA-binding (see docs.lua):
--desc
---@param filename string
function remove(filename) end