Contents - Index - Previous - Next


CheckArchive method

 

Applies to

TVCLUnZip component

 

Declaration

function CheckArchive: Boolean;

 

Description

This method is used to check the integrity of an entire archive.  It will process the archive specified by ZipName. In order to test the integrity of a single file within an archive, use the FileIsOK Property.  

This function will return True if the archive tests ok and false if any of the files do not test ok.  This could be one or more files that are corrupt in the archive.  In order to tell which files are corrupt during the call to CheckArchive, you should define a OnBadCRC Event which will be called for each bad file.  Using the FileIndex parameter that is passed in to this event procedure, you can tell which file is bad. 

 

IMPORTANT:  Please be aware that CheckArchive will clear the FilesList, so you will have to populate the FilesList AFTER calling CheckArchive if you plan on using FilesList to zip or unzip specific files after calling CheckArchive.