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

Method remove_file

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

Removes a file from the filesystem. Note that there is no guarantee that the file is immediately deleted (e.g. depending on platform, other open file descriptors may prevent immediate removal). This is a proxy to [`tokio::fs::remove_file`].

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

Source from the content-addressed store, hash-verified

240 ///
241 /// This is a proxy to [`tokio::fs::remove_file`].
242 pub async fn remove_file(&self, path: impl AsRef<Path>) -> io::Result<()> {
243 match self {
244 Self::Real => fs::remove_file(path).await,
245 Self::Chroot(root) => fs::remove_file(append(root.path(), path)).await,
246 Self::Fake(_) => panic!("unimplemented"),
247 }
248 }
249
250 /// Removes a directory at this path, after removing all its contents. Use carefully!
251 ///

Callers 2

delete_todoFunction · 0.80

Calls 2

appendFunction · 0.70
pathMethod · 0.45

Tested by 1