diff --git a/examples/copy.rs b/examples/copy.rs index 4deafde..9b97a4f 100644 --- a/examples/copy.rs +++ b/examples/copy.rs @@ -1,5 +1,5 @@ use cosmic_files::operation::{recursive::Context, ReplaceResult}; -use std::{error::Error, io}; +use std::{error::Error, io, path::PathBuf}; fn main() -> Result<(), Box> { let mut context = Context::new() @@ -24,7 +24,13 @@ fn main() -> Result<(), Box> { } }); - context.recursive_copy("test/a", "test/b")?; - context.recursive_move("test/b", "test/c")?; + context.recursive_copy_or_move( + vec![(PathBuf::from("test/a"), PathBuf::from("test/b"))], + false, + )?; + context.recursive_copy_or_move( + vec![(PathBuf::from("test/b"), PathBuf::from("test/c"))], + true, + )?; Ok(()) }