How to get file list by extension?
elisp
Solution
No, you do not need any extra filtering. `directory-files` does everything you want, i.e., including the filtering to match the extension (e.g. `ext`):
(directory-files DIRECTORY nil "\\.ext$")
See `C-h f directory-files`. For the current directory, you can use:
(directory-files default-directory nil "\\.ext$")
Problem
I want to get a list of all files with specific extension in a directory, and then pass it as an argument. How to do it in ELisp?