SecureBlackbox 2020 .NET Edition

Questions / Feedback?

FileExtractionStart Event

Signifies the start of a file extraction process.

Syntax

public event OnFileExtractionStartHandler OnFileExtractionStart;

public delegate void OnFileExtractionStartHandler(object sender, AsicverifierFileExtractionStartEventArgs e);

public class AsicverifierFileExtractionStartEventArgs : EventArgs {
  public string FileName { get; }
  public long FileSize { get; }
  public string ModDate { get; }
  public string DestFile { get; set; }
}
Public Event OnFileExtractionStart As OnFileExtractionStartHandler

Public Delegate Sub OnFileExtractionStartHandler(sender As Object, e As AsicverifierFileExtractionStartEventArgs)

Public Class AsicverifierFileExtractionStartEventArgs Inherits EventArgs
  Public ReadOnly Property FileName As String
  Public ReadOnly Property FileSize As Long
  Public ReadOnly Property ModDate As String
  Public Property DestFile As String
End Class

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 component 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 .NET Edition - Version 20.0 [Build 8165]