reflink package¶
Submodules¶
reflink.backend module¶
Used by autodoc_mock_imports.
reflink.linux module¶
Used by autodoc_mock_imports.
reflink.reflink module¶
Main module.
-
reflink.reflink.
reflink
(oldpath, newpath)[source]¶ Create a reflink from
newpath
tooldpath
. Raises aNotImplementedError
when the OS does not implement reflink. Raises aReflinkImpossibleError
when trying to reflink between devices, Raises anIOError
when:oldpath
is a directory- The user has no permissions to create
newpath
- Trying to reflink into a swapfile (ETXTBSY)
For debugability’s sake,
reflink
_can_ throw IOError in other cases, when the underlying system call fails for another reason. However, these reasons cannot be triggered with this basic call. See man IOCTL-FICLONERANGE(2) andbackend.py
for more details on these conditions.Example code:
>>> from reflink import reflink >>> reflink("large_file.img", "copy_of_file.img") >>>
Module contents¶
Top-level package for Python reflink.