Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Support clonefile(2) on macOS #36

Open
zachriggle opened this issue Sep 28, 2022 · 0 comments
Open

[Feature] Support clonefile(2) on macOS #36

zachriggle opened this issue Sep 28, 2022 · 0 comments

Comments

@zachriggle
Copy link

zachriggle commented Sep 28, 2022

fcp is an awesome project, and amazingly fast.

However, it could be even faster if it used the clonefile(2) syscall on macOS. This is instantaneous and creates a copy-on-write file backed by the same filesystem blocks as the original. For copies that do not cross onto different filesystems / devices, this is effectively identical to a manual copy, while being O(1) instead of O(n).

Rendered man page here: https://www.manpagez.com/man/2/clonefile/
Raw man page here: https://opensource.apple.com/source/xnu/xnu-3789.21.4/bsd/man/man2/clonefile.2.auto.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant