Home  »  CodeGuidesProgrammingSnippetsTechnology   »   Rust Create Directory if Not Exists Code

Rust Create Directory if Not Exists Code

Posted: September 11, 2022 | by Site Host

Rust create directory if not exists example snippet:

use std::fs;

fn main() -> std::io::Result<()> {
    fs::create_dir_all("/some/dir")?;
    Ok(())
}

Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.

Share it!

See also  Get Rid of Arrows in Number Input