← tool index · tools/create_dir.py
| group | targets | composed? | policy | git | paginated | friction |
|---|---|---|---|---|---|---|
| mutate-structure | folder | primitive | mutate-structure | ✓ (.gitkeep) | — | — |
Create a directory (parents created as needed).
path (required).
Confirmation:
created '/sb/data/raw'
created '/sb/a/b/c' (including 2 parent folders)
Git does not track empty directories, so create_dir silently drops a
.gitkeep inside the new folder — the empty directory is tracked and
rollback restores it (Tiers & recovery). Only
the leaf gets the marker (parents contain their children).
list_dir filters .gitkeep from display, and the
recursive-friction census excludes it from emptiness.
"Already exists" is informative, not fatal — a normal result that leaves contents untouched:
'/sb/data/raw' already exists
The only true failure is a file in the way:
'/sb/raw' is a file — cannot create a folder there