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