Using bash on macos I can create COW file clones with cp -c
. Is there a Python library that provides the same functionality? The copy functions in shutil doesn't seem to mention cloning.
On APFS clones: https://developer.apple.com/library/content/documentation/FileManagement/Conceptual/APFS_Guide/Features/Features.html
On BSD clonefile: http://www.manpagez.com/man/2/clonefile/
mmap
I haven't been able to find any information on cow files on osx... – Skegcopyfile
command (which is what cp -c relies on), so you'll have to make system calls as Dylan suggested. – Skeg