开发者

Looking for a function like "directory" that will return directories not files in Common Lisp

开发者 https://www.devze.com 2023-02-17 07:58 出处:网络
I have used the handy function directory in the past to find a list a list of files at a give path something like this:

I have used the handy function directory in the past to find a list a list of files at a give path something like this:

(make-pathname :directory "some/path" :name :wild :type :wild)

开发者_开发知识库

but as far as I can tell from the documentation and my experimentation this function will only return files and never directories. Is there a similar function in standard common lisp that will return directories as well? Does directory in-fact do this and I just missed something? I am using the Clozure CCL implementation of common lisp.


As it turns out, CCL has its own directory method that has a key argument :directories which if set to true will show subdirectories. I was just looking at the wrong documentation. DOH!

0

精彩评论

暂无评论...
验证码 换一张
取 消