pub trait PathChild {
// Required method
fn child<P>(&self, path: P) -> ChildPath
where P: AsRef<Path>;
}
Expand description
Required Methods§
sourcefn child<P>(&self, path: P) -> ChildPathwhere
P: AsRef<Path>,
fn child<P>(&self, path: P) -> ChildPathwhere P: AsRef<Path>,
Access a path within the temp directory.
Examples
use assert_fs::prelude::*;
let temp = assert_fs::TempDir::new().unwrap();
println!("{}", temp.path().display());
println!("{}", temp.child("foo/bar.txt").path().display());
temp.close().unwrap();