start_byte Property

The byte index in RemoteFile and LocalFile from which to start the transmission.

Syntax

def get_start_byte() -> str: ...
def set_start_byte(value: str) -> None: ...

start_byte = property(get_start_byte, set_start_byte)

Default Value

"0"

Remarks

This property contains a zero-based index in both remote_file and local_file that determines the point where the transmission of data starts from. This is useful for resuming interrupted downloads and uploads of files from FTP servers.

Once set, the start_byte index is used for all future downloads/uploads. The property must be reset to "0" for normal downloads/uploads.

The type of the property is a string instead of numeric to allow for certain implementations that expect an alphanumeric marker of the start index.

In the on_transfer event, the TransferredBytes parameter will include the bytes skipped (i.e. it will show start_byte more bytes than actually transferred).

NOTE: some FTP servers may not support the FTP 'REST' command. If that is the case with the server you are accessing, you will not be able to use the start_byte property.

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