2 ms·
If the author is looking at a Rust specific function, then the actual advice should be to use File::copy(). That function forwards to OS specific implementation
by ziml77 5y ago
If the author is looking at a Rust specific function, then the actual advice should be to use File::copy(). That function forwards to OS specific implementations which use copy_file_range on Linux, fcopyfile on macOS, and CopyFileExW on Windows.