pub async fn remove_dir_all(from_dir: PathBuf) -> Result<()> {
    if !path_exists(&from_dir).await? {
        return Ok(());
    }
    spawn_blocking(move || {
        ::remove_dir_all::remove_dir_all(from_dir.as_path()).context("error removing directory")?;
        Ok(())
    })
    .await
}
/// A utility function to recursively delete a directory.
///
/// Use this instead of fs::remove_dir_all(...) because of Windows compatibility issues, per
/// advice of https://blog.qwaz.io/chat/issues-of-rusts-remove-dir-all-implementation-on-windows
A utility function to recursively delete a directory.
A utility function to recursively delete a directory .
pub async fn remove_dir_all(from_dir: PathBuf) -> Result<()> {
    if !path_exists(&from_dir).await? {
        return Ok(());
    }
    spawn_blocking(move || {
        ::remove_dir_all::remove_dir_all(from_dir.as_path()).context("error removing directory")?;
        Ok(())
    })
    .await
}
pub async fn remove_dir_all ( from_dir : PathBuf ) -> Result < ( ) > { if ! path_exists ( & from_dir ) . await ? { return Ok ( ( ) ) ; } spawn_blocking ( move | | { :: remove_dir_all :: remove_dir_all ( from_dir . as_path ( ) ) . context ( " " ) ? ; Ok ( ( ) ) } ) . await }
A utility function to recursively delete a directory.
A utility function to recursively delete a directory .
from_dir
PathBuf
from_dir
PathBuf