Skip to content

Commit 4f00abf

Browse files
committed
Switch file system API from std::fs to tokio::fs to
1 parent 19c02e2 commit 4f00abf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

crates/wkg/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{fs, io::Seek, path::PathBuf};
1+
use std::{io::Seek, path::PathBuf};
22

33
use anyhow::{ensure, Context};
44
use clap::{Args, Parser, Subcommand, ValueEnum};
@@ -313,8 +313,8 @@ impl GetArgs {
313313
let output_trailing_slash = self.output.as_os_str().to_string_lossy().ends_with('/');
314314
let parent_dir = if output_trailing_slash {
315315
let parent_dir = self.output.as_path();
316-
if !fs::exists(parent_dir)? {
317-
fs::create_dir_all(parent_dir)
316+
if !tokio::fs::try_exists(parent_dir).await? {
317+
tokio::fs::create_dir_all(parent_dir).await
318318
.context("Failed to create output dir")?
319319
}
320320
parent_dir

0 commit comments

Comments
 (0)