The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

Create A Directory In Rust (Recursively)

TODO: Pull subtitle into page object
Code
use std::fs;

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

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

Create A Directory In Rust (Recursively)

This is the rust version of `mkdir`` copied 
straight from the docs. This version
creates parent directories too (i.e. it's 
like `mkdir -p``). Using `create_dir()``
by itself will just make one. 

-- code
-- rust

use std::fs;

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


-- categories
-- Rust 


-- ref
-- title: Rust - std::fs::create_dir_all
-- url: https://doc.rust-lang.org/std/fs/fn.create_dir_all.html

-- ref
-- title: Rust - std::fs::create_dir
-- url: https://doc.rust-lang.org/std/fs/fn.create_dir.html


-- metadata
-- date: 2023-06-29 18:32:16
-- id: 2rtmpnzo
-- site: aws
-- type: post
-- status: published