Make new directories if they don't already exist, like
This is just a wrapper for mkdir that causes an error on any failure.
(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)) ((unless successp) (raise "Failed to create ~s0." dir) state)) state)))
(defthm state-p1-of-mkdir! (implies (force (state-p1 state)) (b* ((state (mkdir!-fn dir state))) (state-p1 state))) :rule-classes :rewrite)