Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sbcl (directory "*") not returning all files (missing *.lisp for example)

SBCL (directory "*") is filtering out some file names based on extension. How do I get it to return all files, or especially all files matching a pattern (as in bash globing)

(directory "*") ;Lists some files, not all (directory "MyFile") ;Lists some files, but again, filters by extension

Extensions that seem to me ignored... at least *.lisp is not listed.

SBCL 1.1.2-1.fc18 on Fedora18

like image 529
9mjb Avatar asked Dec 20 '22 02:12

9mjb


1 Answers

May be you should use native form:

(directory (make-pathname :name :wild :type :wild))

As all this strange signs *?.* don't increase understandability of the code. Lisp is not supposed to be one-liners language. :)

But if you want just list all files in the directory, you may use cl-fad function list-directory.

like image 169
Menschenkindlein Avatar answered May 15 '23 03:05

Menschenkindlein