Function std::fs::create_dir [] [src]

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

Creates a new, empty directory at the provided path

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.

Examples

fn main() { use std::fs; fn foo() -> std::io::Result<()> { try!(fs::create_dir("/some/dir")); Ok(()) } }
use std::fs;

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