Anonymous user
Walk a directory/Non-recursively: Difference between revisions
Walk a directory/Non-recursively (view source)
Revision as of 00:38, 28 September 2012
, 11 years agoadd 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}}==
|