{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreih4h4zdyauwcpqb7y2xxg6vcx3tuc2wtnptln6vmdw7b3a2hclxze",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mh2pn3d7zwv2"
},
"path": "/t/idea-add-an-option-to-set-the-mode-to-fs-copy/24080#post_7",
"publishedAt": "2026-03-14T22:11:39.000Z",
"site": "https://internals.rust-lang.org",
"textContent": "As mentioned by zackw, `io::copy` definitely can do those. The implementation literally first tries a function called `kernel_copy` and falls back to generic copying if that doesn’t work. Specifically on Linux the docs note that\n\n> On Linux (including Android), this function uses `copy_file_range(2)` , `sendfile(2)` or `splice(2)` syscalls to move data directly between file descriptors if possible.",
"title": "Idea: Add an option to set the mode to fs::copy"
}