Zip plugin looks to have event.response with listing of the files. I guess one could put those in a table and then delete them:
local zip = require( "plugin.zip" ) local function zipListener( event ) if ( event.isError ) then print( "Error!" ) else print ( event["type"] ) --\> list print( event.response ) --\> [1] = table: 0x618001466580 { --\> ratio: 98 --\> size: 2188295440 --\> file: space.jpg --\> [2] = table: 0x618001466580 { --\> ratio: 98 --\> size: 2188295440 --\> file: space1.jpg end end -- List all files from "test.zip" with additional file info local zipOptions = { zipFile = "test.zip", zipBaseDir = system.DocumentsDirectory, listener = zipListener } zip.list( zipOptions )
but it seems to me this is an opportunity for a new plugin/module for someone who knows more than I do about all this.
I have also discovered os.remove function and it states that it deletes a file or directory:
os.remove( file )
file (required)
String. String specifying the name of the file or directory to remove.
but if I name a directory containing files it’s not working - only works if the folder is empty, else I get the: Directory not empty in console.