Walk a directory/Non-recursively: Difference between revisions

add emacs lisp
(→‎{{header|C++}}: Fixed another error and simplified code.)
(add emacs lisp)
Line 236:
.bash_profile
.bash_profile~</lang>
 
=={{header|Emacs Lisp}}==
<code>directory-files</code> gives filenames in a given
directory, optionally restricted to those matching a regexp.
 
<lang lisp>(directory-files "/some/dir/name"
nil ;; just the filenames, not full paths
"\\.c\\'" ;; regexp
t) ;; don't sort the filenames
=>
("foo.c" "bar.c" ...)</lang>
 
=={{header|Euphoria}}==