Trait assert_fs::fixture::PathCopy [−][src]
pub trait PathCopy {
fn copy_from<P, S>(
&self,
source: P,
patterns: &[S]
) -> Result<(), FixtureError>
where
P: AsRef<Path>,
S: AsRef<str>;
}
Expand description
Copy files into TempDir
.
Required methods
Copy files and directories into the current path from the source
according to the glob
patterns
.
Examples
use assert_fs::prelude::*;
let temp = assert_fs::TempDir::new().unwrap();
temp.copy_from(".", &["*.rs"]).unwrap();
temp.close().unwrap();