Struct temporary::Directory [] [src]

pub struct Directory {
    // some fields omitted
}

Methods

impl Directory
[src]

fn new(prefix: &str) -> Result<Directory>

Create a temporary directory. The directory will have a name starting from prefix, and it will be automatically removed when the object is destroyed.

fn new_in<T: AsRef<Path>>(root: T, prefix: &str) -> Result<Directory>

Create a temporary directory in the location specified by root. The directory will have a name starting from prefix, and it will be automatically removed when the object is destroyed.

fn path<'d>(&'d self) -> &'d Path

Return the path to the directory.

fn remove(self) -> Result<()>

Remove the directory.

fn unwrap(self) -> Result<()>

Dispose the object without removing the actual directory.

Trait Implementations

impl Drop for Directory
[src]

fn drop(&mut self)

A method called when the value goes out of scope. Read more