On this page:
emacs-lisp-file?
find-emacs-lisp-files
9.2

12 Enigma API: Find System Utils🔗

 (require enigma/system/utils/find) package: enigma-app

procedure

(emacs-lisp-file? file-path)  boolean?

  file-path : path-string?
Checks whether file-path is an Emacs Lisp file.

procedure

(find-emacs-lisp-files start-path)  (listof path?)

  start-path : path-string?
Recursively finds all Emacs Lisp files under start-path.

The source code of this module:

#lang racket/base
 
(require racket/contract/base)
(require racket/file)
 
(require threading)
 
(provide
 (contract-out
  [emacs-lisp-file?
   (-> path-string?
       boolean?)]
  [find-emacs-lisp-files
   (-> path-string?
       (listof path?))]))
 
(define emacs-lisp-file?
  (lambda~> expand-user-path
            path->complete-path
            simplify-path
            path->string
            (regexp-match #rx"\\.el$" _)
            (and #true)))
 
(define find-emacs-lisp-files
  (lambda~> expand-user-path
            path->complete-path
            (simplify-path #true)
            (find-files emacs-lisp-file? #:follow-links? #true _)))