I want to delete png files in system.TemporaryDirectory.
But “No such file or directory” message is showed.
Please teach resolution!!!
local destDir = system.TemporaryDirectory
local oldfile = system.pathForFile(“temp1.png”)
local newfile = system.pathForFile(“temp1.png”, destDir)
os.rename(oldfile, newfile)
local img = display.newImage(“temp1.png”, destDir, 200, 200)
img:removeSelf()
img = nil
local results, reason = os.remove(“temp1.png”, destDir, 200, 200)
if results then
print( “file removed” )
else
print( reason )
end [import]uid: 133346 topic_id: 27920 reply_id: 327920[/import]
[import]uid: 52491 topic_id: 27920 reply_id: 113039[/import]