pub async fn clear_directory<D: Into<String>>(dir_name: D) -> Result<()>