pub async fn copy_file(
source: &Path,
destination: &Path,
dir: BaseDirectory,
) -> Result<(), Error>
Expand description
Copies a file to a destination.
§Example
use tauri_sys::fs;
fs::copy_file(source, destination, BaseDirectory::Download).expect("could not copy file");
Requires allowlist > fs > copyFile
to be enabled.