ensure_directory_exists

Function ensure_directory_exists 

Source
pub fn ensure_directory_exists(dir: &Path) -> Result<PathBuf>
Expand description

Ensures a directory exists, creating it if necessary.

§Arguments

  • dir - The directory path

§Returns

The canonical path to the directory

§Errors

Returns an error if the directory cannot be created