문제

My folder looks this way

c:/bar/
c:/bar/dir1
c:/bar/dir2
c:/bar/00.txt
c:/bar/02.txt

I can list files

(directory "c:/bar/*.*")
(#P"c:/bar/00.txt" #P"c:/bar/01.txt")

but have a problem listing subdirectories

(directory "c:/bar/*")
NIL

(directory "c:/bar/*/")
NIL

What I am doing wrong?

도움이 되었습니까?

해결책

Use :directories t in CCL:

(directory "C:/bar/*.*" :directories t)

However, if you want to write implementation independent code (e.g. a library you want to share), you should probably heed Vsevolod's recommendation, and use a compatibility layer like cl-fad.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top