/// This deletes the input directory, if it exists
This deletes the input directory, if it exists
This deletes the input directory if it exists
pub fn ensure_dir_does_not_exist<P: AsRef<Path>>(path: &P) -> Fallible<()> {
    if path.as_ref().exists() {
        // remove the directory and all of its contents
        fs::remove_dir_all(path).with_context(delete_dir_error(path))?;
    }
    Ok(())
}
pub fn ensure_dir_does_not_exist < P : AsRef < Path > > ( path : & P ) -> Fallible < ( ) > { if path . as_ref ( ) . exists ( ) { // remove the directory and all of its contents fs :: remove_dir_all ( path ) . with_context ( delete_dir_error ( path ) ) ? ; } Ok ( ( ) ) }
This deletes the input directory, if it exists
This deletes the input directory if it exists
path
&P