MCPcopy Index your code
hub / github.com/python/cpython / _ficlone

Function _ficlone

Lib/pathlib/_os.py:43–49  ·  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

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

Callers 1

copyfileobjFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…