[][src]Trait assert_fs::fixture::FileWriteFile

pub trait FileWriteFile {
    fn write_file(&self, data: &Path) -> Result<(), FixtureError>;
}

Write (copy) a file to ChildPath.

Required methods

fn write_file(&self, data: &Path) -> Result<(), FixtureError>

Write (copy) a file to ChildPath.

Examples

use std::path::Path;
use assert_fs::prelude::*;

let temp = assert_fs::TempDir::new().unwrap();
temp
   .child("foo.txt")
   .write_file(Path::new("Cargo.toml"))
   .unwrap();
temp.close().unwrap();
Loading content...

Implementors

impl FileWriteFile for ChildPath
[src]

impl FileWriteFile for NamedTempFile
[src]

Loading content...