Delete a downloaded file

I am coding an app that will access a web site and download an image if required, then save it in documents, can codea delete the image when required. Eg when you exit it does a cleanup of unwanted images.

Thanks

Well if you create a button as use the close() function as a callback but also use saveImage(downloaded image paths (string),nil), this deletes the image specified.

Thanks @Luatee I will try that tonight