mirror of
https://github.com/containerd/containerd.git
synced 2026-08-12 12:14:44 +00:00
The Go stdlib does not seem to have an efficient os.File.ReadFrom
routine for other platforms like it does on Linux with
copy_file_range. For Darwin at least we can use clonefile
in its place, otherwise if we have a sparse file we'd have
a fun surprise with the io.Copy approach..
We should see if there's other platforms that we can enhance here.
I've forgotten what's the right route on Windows.
Signed-off-by: Danny Canter <danny@dcantah.dev>
(cherry picked from commit 13ff185ba0)
Signed-off-by: Danny Canter <danny@dcantah.dev>