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

Write (copy) a file to ChildPath.

Required Methods§

source

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();

Implementors§