You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Lists a zip files contents.

Syntax

Result = SRP_Zip("GetFileList", ZipHandle)

Returns

1 if successful, 0 if not.

Parameters

NameDescription
ZipHandle Handle to an opened zip file.

Remarks

Call this service to get an @FM delimited list of items in from the zip file. The order of the items in the list will be in the same order they are stored inside the zip file, which means you can use the field number of this list as an index to ExtractFile or RemoveFile. For example, if "MyImage.bmp" is the third field in the list, then it's index of 3 can be used to extract or remove it. Note that each entry is a full path and file name of an item as it appears within the zip file.

Example

// remove a single known file
hZip = SRP_Zip_Open("C:\MyFile.zip")
If hZip EQ 0 then
   Call Msg(@Window, SRP_Zip_GetLastError())
end else
   FileIndex = SRP_Zip_FindFile(hZip, "MyImage.BMP")
   If FileIndex NE 0 then
       Data = SRP_Zip_RemoveFile(hZip, FileIndex)
   end
   SRP_Zip_Close(hZip)
end
  • No labels