mkdir-rs-1.0.4 is not a library.
README.md
mkdir-rs: Robust mkdir for Windows with Brace Expansion
A production-ready Rust replacement for mkdir on Windows that supports Linux-style brace expansion patterns.
Features
- 🔧 Full Brace Expansion:
{a,b,c}syntax with nested support - 📁 Recursive Creation: Create deep directory trees in one command
- 🚀 Production Ready: Comprehensive error handling, logging, and edge cases
- 🎯 Cross-Platform: Works on Windows, Linux, and macOS (primary focus: Windows)
- 🔒 Safe Operations: No silent failures, proper error reporting
- ⚡ High Performance: Compiled, optimized Rust binary
Installation
From Crates.io
From Source
The binary will be at target/release/mkdir-rs.exe (Windows) or target/release/mkdir-rs (Unix).
you can rename to mkdir.exe and copy to anywhere as you want (c:\Windows\System32, etc)
Add to PATH
Copy the binary to a location in your PATH, or add the release directory to your PATH.
Usage
Basic Examples
# Simple brace expansion
# Creates: dir1/dir2, dir1/dir3, dir1/dir4
# Brace expansion with spaces (spaces ARE part of directory names)
# Creates: dir1/dir2, dir1/ dir3, dir1/ dir4
# Create parent directories as needed
# Verbose output
# Multiple brace expansions
# Creates: project1/src, project1/docs, project2/src, project2/docs
# Nested brace expansions
# Creates: project/src/main, project/src/test, project/docs
Options
-p, --parents- Create parent directories as needed (no error if exists)-v, --verbose- Print a message for each directory created-m, --mode <MODE>- Set permissions (ignored on Windows, for compatibility)
Comparison with Linux mkdir
| Feature | Linux mkdir | mkdir-rs |
|---|---|---|
| Brace expansion | Shell handles it | Built-in |
| Parent creation (-p) | ✅ | ✅ |
| Verbose mode (-v) | ✅ | ✅ |
| Mode setting (-m) | ✅ | ✅ (ignored on Windows) |
| Multiple patterns | ✅ | ✅ |
| Windows support | ❌ (requires WSL) | ✅ Native |
Edge Cases Handled
- Empty brace expansions:
{}→ Error - Unmatched braces:
{a,b→ Error - Spaces in expansions: Preserved as-is (matches Linux behavior)
- Path separator normalization: Automatically converts
/to\on Windows - Directory already exists: With
-p, succeeds silently; without-p, reports error - Deeply nested patterns: Handles arbitrary nesting levels
- Unicode characters: Full UTF-8 support in directory names
Building from Source
# Debug build
# Optimized release build
# Run tests
# Lint and format
Testing
# Run all tests
# Run with output
# Run specific test
License
MIT License - See LICENSE file for details
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
