Source code for reemote.callbacks.progress.multi_file_transfer_progress
# Copyright (c) 2025 Kim Jarvis TPF Software Services S.A. kim.jarvis@tpfsystems.com # This software is licensed under the MIT License. See the LICENSE file for details.#
[docs]classMulti_file_transfer_progress:""" Progress handler that tracks multiple builtin Args: src_path: Source builtin path dst_path: Destination builtin path copied_bytes: Number of bytes copied so far total_bytes: Total bytes to copy (None if unknown) """def__init__(self):self.files={}self.start_time=time.time()def__call__(self,src_path,dst_path,copied_bytes,total_bytes):# Track current builtin progressself.files[src_path]=(copied_bytes,total_bytes)# Calculate overall progresstotal_files=len(self.files)completed_files=sum(1forcopied,totalinself.files.values()iftotalandcopied==total)elapsed=time.time()-self.start_timeprint(f"Files: {completed_files}/{total_files} completed | Time: {elapsed:.1f}s")# Show current builtin progressiftotal_bytes:percentage=(copied_bytes/total_bytes)*100print(f"Current: {os.path.basename(src_path)} - {percentage:.1f}%")