Make new directories if they don't already exist, like mkdir -p,
or cause a hard error if there is any problem.
(mkdir! dir &optional (state 'state)) → state
- dir — The path that you want to create, e.g., ./foo/bar.
Guard (stringp dir).
- state — Type (state-p1 state), given (force (state-p1 state)).
This is just a wrapper for mkdir that causes an error on any
Definitions and Theorems
(defun mkdir!-fn (dir state)
(declare (xargs :stobjs (state)))
(declare (xargs :guard (stringp dir)))
(let ((__function__ 'mkdir!))
(declare (ignorable __function__))
(b* (((mv successp state) (mkdir dir state))
(raise "Failed to create ~s0." dir)
(implies (force (state-p1 state))
(b* ((state (mkdir!-fn dir state)))