1 2 3 4 5 6 7 8
use std::{fs, path::Path}; fn main() { let mut result = Ok(()); if !Path::new("~/.tmux-thing").exists() { result = fs::create_dir("~/.tmux-thing"); } println!("{:?}", result) }