MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / remove_dir_all

Method remove_dir_all

crates/chat-cli/src/os/fs/mod.rs:253–259  ·  view source on GitHub ↗

Removes a directory at this path, after removing all its contents. Use carefully! This is a proxy to [`tokio::fs::remove_dir_all`].

(&self, path: impl AsRef<Path>)

Source from the content-addressed store, hash-verified

251 ///
252 /// This is a proxy to [`tokio::fs::remove_dir_all`].
253 pub async fn remove_dir_all(&self, path: impl AsRef<Path>) -> io::Result<()> {
254 match self {
255 Self::Real => fs::remove_dir_all(path).await,
256 Self::Chroot(root) => fs::remove_dir_all(append(root.path(), path)).await,
257 Self::Fake(_) => panic!("unimplemented"),
258 }
259 }
260
261 /// Renames a file or directory to a new name, replacing the original file if
262 /// `to` already exists.

Callers 2

cleanupMethod · 0.80

Calls 2

appendFunction · 0.70
pathMethod · 0.45

Tested by 1