Copy_file_range() Function Of Os Module In Python

Overview:

  • The function copy_file_range() copies a byte range from one file to another.

  • Byte range in the source file is specified using the offset_src and count parameters.

  • The starting position from where the byte range is to be copied into the destination file is specified by the offset_dst.

The copy_file_range() function of os module in Python

Parameters:

src – The file descriptor of the source file

dst – The file descriptor of the destination file

count – No of bytes to be copied

offset_src – Starting of the byte range in the source file

offset_dst – Starting of the byte range in the destination file

Return Value:

Number of bytes copied


Copyright 2023 © pythontic.com