pub async fn create_dir_all<P>(path: P) -> Result<(), Error> where
    P: AsRef<Path>, 
Expand description

Creates a directory and its parent directories if they are missing.

Errors

An error will be returned in the following situations:

  • path already points to an existing file or directory.
  • The current process lacks permissions to create the directory or its missing parents.
  • Some other I/O error occurred.

Examples

async_fs::create_dir_all("./some/directory").await?;