IPWorks ZIP 2020 Python Edition

Questions / Feedback?

on_begin_file Event

Fired before each file is processed.

Syntax

class SevenZipBeginFileEventParams(object):
  @property
  def index() -> int: ...
  @property
  def skip() -> bool: ...
  @skip.setter
  def skip(value) -> None: ...

# In class SevenZip:
@property
def on_begin_file() -> Callable[[SevenZipBeginFileEventParams], None]: ...
@on_begin_file.setter
def on_begin_file(event_hook: Callable[[SevenZipBeginFileEventParams], None]) -> None: ...

Remarks

on_begin_file is fired before each file is processed by the compressor or decompressor, as appropriate. Index contains the array index of the file about to be processed, and the file_compressed_name, file_decompressed_name, file_compressed_size (decompression only), and file_decompressed_size fields of the files collection for this index contain more detailed information about the file about to be processed.

When extracting, an alternate location may be specified by trapping the event, and modifying file_decompressed_name and/or extract_to_path. If the appropriate value of file_decompressed_name is set to an empty string, the file will not be written to disk. If WriteToProgressEvent is true, the file will still be decompressed, and the data may be extracted through the on_progress event.

This event may also be trapped while compressing. file_compressed_name and file_decompressed_name may be changed.

You may set the Skip parameter to true in order to skip the file completely while compressing or extracting.

 
 
Copyright (c) 2021 /n software inc. - All rights reserved.
IPWorks ZIP 2020 Python Edition - Version 20.0 [Build 7720]