BeforeExtractFile Event
Marks the start of extraction of an archived file.
Syntax
public event OnBeforeExtractFileHandler OnBeforeExtractFile; public delegate void OnBeforeExtractFileHandler(object sender, ArchivereaderBeforeExtractFileEventArgs e); public class ArchivereaderBeforeExtractFileEventArgs : EventArgs { public string Path { get; } public long FileSize { get; } public int DataSource { get; set; } public string ExtractionPath { get; set; } public bool Skip { get; set; } }
Public Event OnBeforeExtractFile As OnBeforeExtractFileHandler Public Delegate Sub OnBeforeExtractFileHandler(sender As Object, e As ArchivereaderBeforeExtractFileEventArgs) Public Class ArchivereaderBeforeExtractFileEventArgs Inherits EventArgs Public ReadOnly Property Path As String Public ReadOnly Property FileSize As Long Public Property DataSource As Integer Public Property ExtractionPath As String Public Property Skip As Boolean End Class
Remarks
Subscribe to this event to be notified about the start of extraction of an archived entry. The handler of this event is a good place to tune up the destination media.
The Path parameter indicates the path to the extracted entry in the archive. The FileSize specifies the uncompressed size of the file. Set the by-reference DataSource parameter in accordance with the desired extraction media type:
fdsFile (0) | The data will be saved to a file indicated by the ExtractionPath parameter. You can change the path here. |
fdsStream (1) | The data will be saved into a stream assigned to FileStream property. |
fdsBuffer (2) | The file data will be saved to a buffer and returned via the FileData property. |
Use the Skip parameter to cancel extraction of this file and proceed to the next one.