Fired before each file is processed.
class JarBeginFileEventParams(object): @property def index() -> int: ... @property def skip() -> bool: ... @skip.setter def skip(value) -> None: ... # In class Jar: @property def on_begin_file() -> Callable[[JarBeginFileEventParams], None]: ... @on_begin_file.setter def on_begin_file(event_hook: Callable[[JarBeginFileEventParams], None]) -> None: ...
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.
You may set the Skip parameter to true in order to skip the file completely while compressing or extracting.