[][src]Function async_std::fs::create_dir_all

pub async fn create_dir_all<P: AsRef<Path>>(path: P) -> Result<()>

Creates a new, empty directory and all of its parents if they are missing.

This function is an async version of std::fs::create_dir_all.

Errors

An error will be returned in the following situations (not an exhaustive list):

  • The parent directories do not exists and couldn't be created.
  • The current process lacks permissions to create directory at path.

Examples

use async_std::fs;

fs::create_dir_all("./some/dir").await?;