create_dir_all in async_std::fs - Rust (original) (raw)

Function create_dir_all

Source

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

Expand description

Creates a new 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:

§Examples

use async_std::fs;

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