Function async_std::fs::create_dir[][src]

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

Creates a new directory.

Note that this function will only create the final directory in path. If you want to create all of its missing parent directories too, use the create_dir_all function instead.

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

Errors

An error will be returned in the following situations:

Examples

use async_std::fs;

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