fn check_dir(path: &Path) -> Result<(), LayoutError> {
        std::fs::create_dir_all(path).map_err(|err| LayoutError::IoError {
            path: path.to_path_buf(),
            message: "Failed to create directory".to_string(),
            io_err: err,
        })
    }
/// For `WriteOnly` mode we want to ensure the directory exists
/// when we visit it for the first time as we'll certainly want to
/// create new files inside.
For `WriteOnly` mode we want to ensure the directory exists
when we visit it for the first time as we'll certainly want to
create new files inside.
For ` WriteOnly ` mode we want to ensure the directory exists when we visit it for the first time as we ' ll certainly want to create new files inside .
fn check_dir(path: &Path) -> Result<(), LayoutError> {
        std::fs::create_dir_all(path).map_err(|err| LayoutError::IoError {
            path: path.to_path_buf(),
            message: "Failed to create directory".to_string(),
            io_err: err,
        })
    }
fn check_dir ( path : & Path ) -> Result < ( ) , LayoutError > { std :: fs :: create_dir_all ( path ) . map_err ( | err | LayoutError :: IoError { path : path . to_path_buf ( ) , message : " " . to_string ( ) , io_err : err , } ) }
For `WriteOnly` mode we want to ensure the directory exists
when we visit it for the first time as we'll certainly want to
create new files inside.
For ` WriteOnly ` mode we want to ensure the directory exists when we visit it for the first time as we ' ll certainly want to create new files inside .
path
&Path
path
&Path