• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
      • Io
      • Defttag
      • Sys-call
      • Save-exec
      • Quicklisp
      • Oslib
        • File-types
        • Argv
        • Copy
        • Catpath
        • Universal-time
        • Ls
        • Basename
        • Tempfile
        • Dirname
        • Copy!
        • Mkdir
        • Ls-files
        • Lisp-version
        • Rmtree
        • Ls-subdirs
        • Lisp-type
        • Date
        • Getpid
        • Basenames
        • Dirnames
        • Ls-subdirs!
        • Ls-files!
        • Dirname!
        • Basename!
        • Catpaths
        • Mkdir!
        • Ls!
          • Rmtree!
          • Remove-nonstrings
        • Std/io
        • Bridge
        • Clex
        • Tshell
        • Unsound-eval
        • Hacker
        • Startup-banner
        • Command-line
      • Hardware-verification
      • Software-verification
      • Testing-utilities
      • Math
    • Oslib

    Ls!

    Get a (full) directory listing or cause a hard error.

    Signature
    (ls! path &key (state 'state)) → (mv val state)
    Arguments
    path — Guard (stringp path).
    Returns
    val — Type (string-listp val).
    state — Type (state-p1 state), given (force (state-p1 state)).

    This is just a wrapper for ls that causes a hard error if there are any problems.

    Definitions and Theorems

    Function: ls!-fn

    (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: string-listp-of-ls!.val

    (defthm string-listp-of-ls!.val
            (b* (((mv ?val acl2::?state)
                  (ls!-fn path state)))
                (string-listp val))
            :rule-classes :rewrite)

    Theorem: state-p1-of-ls!.state

    (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)