Trait FileWriteFile

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

Write (copy) a file to ChildPath.

Required Methods§

Source

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

Write (copy) a file to ChildPath.

§Examples
use camino::Utf8Path;
use camino_tempfile_ext::prelude::*;

let temp = Utf8TempDir::new().unwrap();
temp
   .child("foo.txt")
   .write_file(Utf8Path::new("Cargo.toml"))
   .unwrap();
temp.close().unwrap();

Implementors§