]> granicus.if.org Git - llvm/commit
Implement sys::fs::copy_file using the macOS copyfile(3) API
authorAdrian Prantl <aprantl@apple.com>
Thu, 18 Apr 2019 00:01:05 +0000 (00:01 +0000)
committerAdrian Prantl <aprantl@apple.com>
Thu, 18 Apr 2019 00:01:05 +0000 (00:01 +0000)
commitc7cadf83fffba81e2663deb3c0587d08b5a68c9f
tree64e7980c687a2352779a72ef9c71886ac1bd6f43
parent42af05bfbc1ba0b01f75f5699b9b8447b745bb30
Implement sys::fs::copy_file using the macOS copyfile(3) API
to support APFS clones.

This patch adds a Darwin-specific implementation of
llvm::sys::fs::copy_file() that uses the macOS copyfile(3) API to
support APFS copy-on-write clones, which should be faster and much
more space efficient.

https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/APFS_Guide/ToolsandAPIs/ToolsandAPIs.html

Differential Revision: https://reviews.llvm.org/D60802

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358628 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/Path.cpp
lib/Support/Unix/Path.inc