Trait Handle

Source
pub trait Handle {
    // Required methods
    fn is_dir(&self, path: &RelativePath) -> bool;
    fn is_file(&self, path: &RelativePath) -> bool;
    fn create_dir_all(&self, path: &RelativePath) -> Result<()>;
    fn create(&self, path: &RelativePath) -> Result<Box<dyn Write>>;
}

Required Methods§

Source

fn is_dir(&self, path: &RelativePath) -> bool

Check if the given path is a directory or not.

Source

fn is_file(&self, path: &RelativePath) -> bool

Check if the given path is a file or not.

Source

fn create_dir_all(&self, path: &RelativePath) -> Result<()>

Recursively create the given path.

Source

fn create(&self, path: &RelativePath) -> Result<Box<dyn Write>>

Create the given file (for writing).

Implementors§