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

Compare with Current View Page History

Version 1 Current »

Removes a file from a zip file.

Syntax

Result = SRP_Zip("RemoveFile", ZipHandle, Index)

Returns

1 if successful, 0 if not.

Parameters

NameDescription
ZipHandle Handle to an opened zip file.
Index Index of the file to be removed.

Remarks

Call this service to remove a file from a zip file. The value of Index can be the value returned by FindFile or the same index used to reference the file in the value returned by GetFileList.

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