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>)
| 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. |