Struct assert_fs::ChildPath [−][src]
pub struct ChildPath { /* fields omitted */ }
A path within a TempDir
See Trait Implementations.
Examples
use assert_fs::prelude::*; let temp = assert_fs::TempDir::new().unwrap(); let input_file = temp.child("foo.txt"); input_file.touch().unwrap(); temp.child("bar.txt").touch().unwrap(); temp.close().unwrap();
Methods
impl ChildPath
[src]
impl ChildPath
pub fn new<P>(path: P) -> Self where
P: Into<PathBuf>,
[src]
pub fn new<P>(path: P) -> Self where
P: Into<PathBuf>,
Wrap a path for use with special built extension traits.
See trait implementations or PathChild
for more details.
pub fn path(&self) -> &Path
[src]
pub fn path(&self) -> &Path
Access the path.
Trait Implementations
impl PathAssert for ChildPath
[src]
impl PathAssert for ChildPath
ⓘImportant traits for &'a mut Rfn assert<I, P>(&self, pred: I) -> &Self where
I: IntoPathPredicate<P>,
P: Predicate<Path>,
[src]
ⓘImportant traits for &'a mut R
fn assert<I, P>(&self, pred: I) -> &Self where
I: IntoPathPredicate<P>,
P: Predicate<Path>,
Wrap with an interface for that provides assertions on the TempDir
.
impl FileTouch for ChildPath
[src]
impl FileTouch for ChildPath
impl FileWriteBin for ChildPath
[src]
impl FileWriteBin for ChildPath
impl FileWriteStr for ChildPath
[src]
impl FileWriteStr for ChildPath
impl PathCopy for ChildPath
[src]
impl PathCopy for ChildPath