Get a listing of only the regular files within a directory.
(ls-files path &key (state 'state)) → (mv error regular state)
The notion of regular file is governed by regular-file-p. It includes, for instance, symbolic links to regular files.
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 all-files state) (ls path)) ((when err) (mv err nil state))) (ls-files-aux path all-files state))))
Theorem:
(defthm string-listp-of-ls-files.regular (b* (((mv common-lisp::?error ?regular acl2::?state) (ls-files-fn path state))) (string-listp regular)) :rule-classes :rewrite)
Theorem:
(defthm state-p1-of-ls-files.state (implies (force (state-p1 state)) (b* (((mv common-lisp::?error ?regular acl2::?state) (ls-files-fn path state))) (state-p1 state))) :rule-classes :rewrite)