ID EN
OS

copy_file_range

Python 3.11

Copy count bytes from file descriptor src, starting from offset offset_src, to file descriptor dst, starting from offset offset_dst. If offset_src is None, then src is read from the current position; respectively for offset_dst. The files pointed by src and dst must reside in the same filesystem, otherwise an OSError is raised with errno set to errno.EXDEV.

Syntax

PYTHON
os.copy_file_range(src, dst, count, offset_src=None, offset_dst=None)

See Also

OSError errno errno.EXDEV Availability