Zip:delete(entry [, ...] ) method
Deletes one ore more entries from the Zip archive. The Zip archive should have been previously opened in "delete" mode.
Parameters
entry [, ...]
One ore more strings representing the path and/or the name of the entries in the Zip archive, to be removed.
Return value
Returns the number of deleted entries or false in case of error. You can check the Zip.error property to get the error message.Example
-- Remove entries from a zip archive
local compression = require "compression"
local console = require "console"
-- Open the zip archive in "delete" mode
local zipfile = compression.Zip("data.zip", "delete")
-- Deletes two entries
if zipfile:delete("results.xlsx", "doc/readme.txt") then
print("Entries have been successfully removed from the data.zip archive")
else
print("An error occured during entries deletion : "..zip.error)
end