reflink package¶
Submodules¶
reflink.backend module¶
reflink.error module¶
reflink.linux module¶
reflink.reflink module¶
Main module.
- reflink.reflink.reflink(oldpath, newpath)[source]¶
Create a reflink from
newpathtooldpath. Raises aNotImplementedErrorwhen the OS does not implement reflink. Raises aReflinkImpossibleErrorwhen trying to reflink between devices, Raises anIOErrorwhen:oldpathis a directoryThe user has no permissions to create
newpathTrying 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.pyfor 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.