The SkippingFile event is triggered whenever a file is excluded from processing or cannot be processed at all. It is also triggered whenever the TestZipFile method encounters a corrupted file.
The SkippingFile event provides complete information on the file being skipped, as well as the reason it is being skipped. The information provided by the SkippingFile event can be displayed on the screen, put into a log file, printed out, or completely ignored – it's your choice. If you do not write a handler for the SkippingFile event, your application will still be notified if any files are skipped because the method currently executing will return a result code of either xerFilesSkipped or xerNothingToDo (if all files to be processed end up being skipped).
The parameters provided by the SkippingFile event are not modifiable.
Declaration | |
---|---|
|
Declaration (DLL API) | |
---|---|
xcdSkippingFileParams * pParams = ( xcdSkippingFileParams * ) lParam; |
Parameter | Description |
---|---|
sFilename | The path and filename of the file being skipped. When zipping files, this is the path and filename of the file exactly as it would have been stored in the zip file if it was zipped. When unzipping files, this is the path and filename of the file exactly as it is currently stored in the zip file. |
sComment | The file's comment. |
sFilenameOnDisk | The real path and filename of the file being skipped. When zipping files, this is the path and filename of the actual file being zipped. When unzipping files, this is the path and filename that would have been given to the file if it was unzipped. |
lSize | The file's original uncompressed size in bytes. |
lSizeLow lSizeHigh (64) |
The 32 low-order and high-order bits representing the file's original uncompressed size, in bytes. |
lCompressedSize | The file's compressed size. |
lCompressedSizeLow lCompressedSizeHigh (64) |
The 32 low-order and high-order bits representing the file's compressed size, in bytes. |
xAttributes | The file's attributes. |
lCRC | The file's uncompressed data CRC checksum. |
dtLastModified | The last modification date and time stamp. |
dtLastAccessed | The last accessed date and time stamp. |
dtCreated | The creation date and time stamp. |
xMethod | The compression method. |
bEncrypted | Is this an encrypted file? |
xReason | If it will be excluded, why? Values for the xReason parameter that range between 1 and 99 are skipping reasons generated for files that were skipped due to the settings of the filtering properties or the SkipIf* properties. Values of 100 or more are skipping reasons generated because of an error while processing the file. |
Most of the sample applications included with Xceed Zip include a handler for the SkippingFile event which displays a message box indicating which file is being skipped and the reason for skipping the file. You can copy the SkippingFile event handler from the sample application directly into your own application if desired, so you won't have to write any code to handle this event.