Function std::fs::remove_dir
[−]
[src]
pub fn remove_dir<P: AsRef<Path>>(path: P) -> Result<()>
Removes an existing, empty directory.
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.
Examples
fn main() { use std::fs; fn foo() -> std::io::Result<()> { try!(fs::remove_dir("/some/dir")); Ok(()) } }use std::fs; try!(fs::remove_dir("/some/dir"));