Function std::old_io::fs::rmdirUnstable [-] [+] [src]

pub fn rmdir(path: &Path) -> IoResult<()>

Remove an existing, empty directory

Example

fn main() { #![allow(unused_must_use)] use std::old_io::fs; let p = Path::new("/some/dir"); fs::rmdir(&p); }
use std::old_io::fs;

let p = Path::new("/some/dir");
fs::rmdir(&p);

Error

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.