cargo-setupx 0.1.0

Rust-based CLI and library that automates the initial setup of new Rust projects with modular configuration packs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Directory creation utilities

use crate::error::Result;
use std::fs;
use std::path::Path;

/// Create a directory, showing appropriate status message
pub fn create_dir(path: &Path) -> Result<()> {
    if path.exists() {
        println!("⏭️  Skipped  {} (already exists)", path.display());
        return Ok(());
    }

    fs::create_dir_all(path)?;
    println!("📁 Created  {}", path.display());
    Ok(())
}