pub async fn copy_file(
from: impl AsRef<Path>,
to: impl AsRef<Path>,
) -> Result<()>Expand description
Async file copy using reflink when available, falling back to regular copy.
This is more efficient than regular copy on filesystems that support reflinks (APFS, Btrfs).
ยงErrors
- If the copy operation fails.