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