Function std::fs::create_dirUnstable [-] [+] [src]

pub fn create_dir<P: AsPath + ?Sized>(path: &P) -> Result<()>

Create a new, empty directory at the provided path

Example

fn main() { use std::fs; fs::create_dir("/some/dir"); }
use std::fs;

fs::create_dir("/some/dir");

Errors

This function will return an error if the user lacks permissions to make a new directory at the provided path, or if the directory already exists.