Name
zip.LocateFile -- find file in zip archive
Synopsis
idx = zip.LocateFile(id, name$[, table])
Function
This function searches for the file specified by name$ inside the zip archive specified by id and returns its index if it is found, otherwise -1 is returned.

The optional table argument can be used to specify further options. The following table tags are currently recognized:

NoCase:
If this tag is set to True, zip.LocateFile() won't distinguish between upper and lower case characters. This makes the search slower. Defaults to False.

NoDir:
If this tag is set to True, zip.LocateFile() will just match the file name so it will also trigger if the file is in a subdirectory in the archive. Defaults to False.

This function can also operate on directories. See Zip archive basics for details.

Inputs
id
identifier of the zip archive to use
name$
name of the file to locate
table
optional: table argument containing further options (see above)
Results
idx
index of file inside zip archive or -1 if it couldn't be found

Show TOC