MCPcopy Create free account
hub / github.com/SeaQL/FireDBG.for.Rust / re_create_firedbg_folder

Function re_create_firedbg_folder

command/src/main.rs:609–632  ·  view source on GitHub ↗
(workspace: &Workspace)

Source from the content-addressed store, hash-verified

607}
608
609async fn re_create_firedbg_folder(workspace: &Workspace) -> Result<()> {
610 let firedbg_directory = &workspace.get_firedbg_dir();
611 let paths: Vec<_> = glob(&format!("{}/*", firedbg_directory))?
612 .filter_map(Result::ok)
613 .collect();
614 for path in paths {
615 if path.is_dir() && path.ends_with("firedbg/target") {
616 // Keep the FireDBG target directory
617 continue;
618 } else if path.is_dir() {
619 remove_dir_all(&path)
620 .await
621 .with_context(|| format!("Fail to delete directory: `{}`", path.display()))?;
622 } else if path.is_file() {
623 remove_file(&path)
624 .await
625 .with_context(|| format!("Fail to delete file: `{}`", path.display()))?;
626 }
627 }
628 pin_firedbg_version(workspace)
629 .await
630 .context("Fail to pin FireDBG version")?;
631 Ok(())
632}
633
634async fn check_firedbg_version_updated(workspace: &Workspace) -> Result<()> {
635 let current_version = current_firedbg_version();

Callers 1

Calls 2

pin_firedbg_versionFunction · 0.85
get_firedbg_dirMethod · 0.80

Tested by

no test coverage detected