aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/fs.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/util/fs.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/fs.rs b/src/util/fs.rs
index b86c0d7..8ecd0d0 100644
--- a/src/util/fs.rs
+++ b/src/util/fs.rs
@@ -2,11 +2,13 @@
2 2
3use std::path::Path; 3use std::path::Path;
4 4
5use tokio::fs::remove_file;
6
5use crate::errors::McError; 7use crate::errors::McError;
6 8
7pub async fn remove_if_exists(path: &Path) -> Result<(), McError> { 9pub async fn remove_if_exists(path: &Path) -> Result<(), McError> {
8 if path.exists() { 10 if path.exists() {
9 tokio::fs::remove_file(path).await?; 11 remove_file(path).await?;
10 } 12 }
11 Ok(()) 13 Ok(())
12} 14}