diff options
Diffstat (limited to 'vendor/tokio/src/fs/remove_dir.rs')
-rw-r--r-- | vendor/tokio/src/fs/remove_dir.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/vendor/tokio/src/fs/remove_dir.rs b/vendor/tokio/src/fs/remove_dir.rs new file mode 100644 index 000000000..6e7cbd08f --- /dev/null +++ b/vendor/tokio/src/fs/remove_dir.rs @@ -0,0 +1,12 @@ +use crate::fs::asyncify; + +use std::io; +use std::path::Path; + +/// Removes an existing, empty directory. +/// +/// This is an async version of [`std::fs::remove_dir`](std::fs::remove_dir) +pub async fn remove_dir(path: impl AsRef<Path>) -> io::Result<()> { + let path = path.as_ref().to_owned(); + asyncify(move || std::fs::remove_dir(path)).await +} |