Contents - Index - Previous - Next


OnGetNextDisk Event 

 

Applies to

TVCLUnZip component

 

Declaration

property OnGetNextDisk: TGetNextDisk = procedure(Sender: TObject; NextDisk: Integer; var FName: string); of object;

 

 

Description

NOTE: If you do not define this event then DefaultGetNextDisk is called internally and will handle both zipping and unzipping cases for you.  

 

When Unzipping:  

When unzipping from a multi-part zip file this event is triggered when a file that is about to be unzipped is on a different disk from the one that is currently in the drive. NextDisk will tell you the disk number of the multi-part zipfile that should be inserted. The first disk in a disk set is number 1. 

 

If you are working with a blocked archive (multiple files spanned directly to hard drive) then you should work with the OnFileNameForSplitPart event instead.

 

If you have set the CheckDiskLabels Property to True, then the volume label will be checked for the newly inserted diskette to be sure it is for the next disk in the spanned zip file.  Normal spanned zip files have volume labels like 'PKBACK 001', 'PKBACK 002', etc.  So if the current disk is disk 1, and you have CheckDiskLabels set to True, then OnGetNextDisk will repeat until the correct diskette has been inserted.  

 

When Zipping:  

When creating a new multi-part zip file, this event is triggered when the current diskette is full and you should remove it and insert a new diskette.  No checking is involved in this case since VCLZip can only assume you are inserting the disk that you want the next part on, so you may wish to check in some way in this event to be sure that the disk that has been inserted meets your satisfaction.  

 

If you wish to further prepare the diskette that has been inserted (for instance to format or delete currently existing files), you may put code to do so into the OnPrepareNextDisk event which is called right after this event.  

 

WARNING!  It is up to you to be sure the user inserted the correct disk.  Results of inserting the wrong disk are unknown and likely not good.  

 

See Also:  

 

OnPrepareNextDisk