Copy a regular file content using high-performance fcopyfile(3) syscall (macOS).
(source_fd, target_fd)
| 54 | |
| 55 | if posix and hasattr(posix, '_fcopyfile'): |
| 56 | def _fcopyfile(source_fd, target_fd): |
| 57 | """ |
| 58 | Copy a regular file content using high-performance fcopyfile(3) |
| 59 | syscall (macOS). |
| 60 | """ |
| 61 | posix._fcopyfile(source_fd, target_fd, posix._COPYFILE_DATA) |
| 62 | else: |
| 63 | _fcopyfile = None |
| 64 |