[][src]Trait assert_fs::fixture::PathCopy

pub trait PathCopy {
    fn copy_from<P, S>(
        &self,
        source: P,
        patterns: &[S]
    ) -> Result<(), FixtureError>
    where
        P: AsRef<Path>,
        S: AsRef<str>
; }

Copy files into TempDir.

Required methods

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

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();
Loading content...

Implementors

impl PathCopy for ChildPath
[src]

impl PathCopy for TempDir
[src]

Loading content...