SecureBlackbox 2020 PHP Edition

Questions / Feedback?

FileExtractionStart Event

Signifies the start of a file extraction process.

Object Oriented Interface

public function fireFileExtractionStart($param);

Procedural Interface

secureblackbox_asicverifier_register_callback($res, 3, array($this, 'fireFileExtractionStart'));

Parameter List


'filename'
'filesize'
'moddate'
'destfile'

Remarks

This event fires for every file located in the archive and matching the ExtractionMode setting before it is to be extracted.

DestFile indicates the path where the file will be saved to. You can alter the destination path here, by providing an alternative extraction path.

Set DestFile to an empty string and provide a stream object via the OutputStream property if you prefer to save the data to a stream instead of file.

If DestFile is set to an empty string and OutputStream is unassigned, the file will not be extracted.

Alternatively, you can request the extracted content to be saved into a byte array. To do this, leave DestFile and OutputStream empty, and enable the ExtractToMemory config property. This property is automatically reset before extraction of every subsequent file, and should be re-enabled in the handler of this event.

Please take care when extracting large files into byte arrays, as those may consume large amounts of memory.

Note: if DestFile already exists, the class will overwrite it. To prevent overwriting of existing files, subscribe to this event, and change DestFile when needed.

Copyright (c) 2022 /n software inc. - All rights reserved.
SecureBlackbox 2020 PHP Edition - Version 20.0 [Build 8154]