MCPcopy Index your code
hub / github.com/RustPython/RustPython / _ficlone

Function _ficlone

Lib/pathlib/_os.py:44–50  ·  view source on GitHub ↗

Perform a lightweight copy of two files, where the data blocks are copied only when modified. This is known as Copy on Write (CoW), instantaneous copy or reflink.

(source_fd, target_fd)

Source from the content-addressed store, hash-verified

42
43if fcntl and hasattr(fcntl, 'FICLONE'):
44 def _ficlone(source_fd, target_fd):
45 """
46 Perform a lightweight copy of two files, where the data blocks are
47 copied only when modified. This is known as Copy on Write (CoW),
48 instantaneous copy or reflink.
49 """
50 fcntl.ioctl(target_fd, fcntl.FICLONE, source_fd)
51else:
52 _ficlone = None
53

Callers 1

copyfileobjFunction · 0.85

Calls 1

ioctlMethod · 0.80

Tested by

no test coverage detected