Type Function Library zip.* Return value none Revision Release 2022.3683 Keywords zip, list See also zip.compress() zip.uncompress()
Lists all files in a zip archive.
zip.list( options )
Table. A table of options for the function call — see the next section for details.
String. The filename of the zip archive.
Constant. The base directory containing the zip archive.
Listener. The listener function invoked at the end of the operation.
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 )