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

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

Remove an existing, empty directory

Example

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

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

Errors

This function will return an error if the user lacks permissions to remove the directory at the provided path, or if the directory isn't empty.