Idea: Add an option to set the mode to fs::copy
Rust Internals [Unofficial]
March 14, 2026
On Windows you're correct, there's no single function to copy using file handles. You can implement this manually (which is essentially what CopyFile does) but that's more involved. There are some low-level functions which can help, such as NtCopyFileChunk, but that doesn't copy metadata itself and it doesn't work in all cases. Quoting from those docs:
NtCopyFileChunkis used internally by CopyFile for most forms of copy. Current exceptions include cloud copies, SMB offload and ODX.
Discussion in the ATmosphere