Trait PathCopy

Source
pub trait PathCopy {
    // Required method
    fn copy_from<P: AsRef<Utf8Path>, S: AsRef<str>>(
        &self,
        source: P,
        patterns: &[S],
    ) -> Result<(), FixtureError>;
}
Expand description

Copy files into Utf8TempDir.

Required Methods§

Source

fn copy_from<P: AsRef<Utf8Path>, S: AsRef<str>>( &self, source: P, patterns: &[S], ) -> Result<(), FixtureError>

Copy files and directories into the current path from the source according to the glob patterns.

§Examples
use camino_tempfile_ext::prelude::*;

let temp = Utf8TempDir::new().unwrap();
temp.copy_from(".", &["*.rs"]).unwrap();
temp.close().unwrap();

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§