Struct testpath::TempDirCleanup[][src]

pub struct TempDirCleanup { /* fields omitted */ }
Expand description

Augment a TempDir with a custom callback function that can do additional cleanup work (like unmounting filesystem etc.)

Implementations

creates a temporary directory with a cleanup function to be called at drop time.

Trait Implementations

Executes the destructor for this type. Read more

Delete an element from a testpath. Directories are deleted as well. This trait functions defaults to unimplemented because it is deemed to be dangerous. Only the trait implementations which create an disposable directory implement it. Read more

Create a file with the given content in the test directory. Any leading directories are created automatically. The file itself must not already exist. Read more

Create a directory within the test directory. Any leading directories are created automatically. The path must not exist already. Read more

Install something (from outside) into ‘self’. ‘from’ must be some existing directory or a file, symlinks are resolved. Read more

Assert that at the given path exists

Assert that the given path does not exist

Assert that the given path is a directory

Assert that the given path is a file

Assert that the given path is a symlink

Assert that the given path resolves to a element of the given size

Assert that the given path resolves to a element of more than the given size

Assert that the given path resolves to a element of less than the given size

Assert that self contains exactly the same content than another path (directories are recursed). Read more

Assert that self is is structurally equivalent to another path (contain the same files). File contents are not compared. Read more

Assert that self contains the same content than another path for files that exist on both sides. Surplus files on either side are ignored. Read more

Assert that a file content matches the given regex in utf8.

Assert that a file content matches the given regex in bytes.

Return all captures from a regex in utf8.

Return the underlying Path of an TestPath implementation

Return a canonalized/normalized PathBuf to components within the testpath. Assert and panic when path escapes from the testpath. Handles non existing components. Read more

Return a canonalized/normalized PathBuf to components within the testpath. Assert and panic when path escapes from the testpath. Asserts that the given subpath exists. Read more

Return a canonalized/normalized PathBuf to components within the testpath. Assert and panic when path escapes from the testpath. Asserts that the given subpath does not exist. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.