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