Get a listing of the subdirectories of a directory, or cause a hard error.
(ls-subdirs! path &key (state 'state)) → (mv val state)
This is just a wrapper for ls-subdirs that causes a hard error if there are any problems.
Function:
(defun ls-subdirs!-fn (path state) (declare (xargs :stobjs (state))) (declare (xargs :guard (stringp path))) (let ((__function__ 'ls-subdirs!)) (declare (ignorable __function__)) (b* (((mv err val state) (ls-subdirs path)) ((when err) (er hard? 'ls-subdirs! "~@0" err) (mv nil state))) (mv val state))))
Theorem:
(defthm string-listp-of-ls-subdirs!.val (b* (((mv ?val acl2::?state) (ls-subdirs!-fn path state))) (string-listp val)) :rule-classes :rewrite)
Theorem:
(defthm state-p1-of-ls-subdirs!.state (implies (force (state-p1 state)) (b* (((mv ?val acl2::?state) (ls-subdirs!-fn path state))) (state-p1 state))) :rule-classes :rewrite)