Sun 25 Jul 2010 05:14:06 PM UTC, original submission:
I'm using version 9.0.1 (actually git commit 2f3974e6fc01e28bbc5f4416bb76adf5d079c987) on Linux x86_64.
The documentation for directory-read says: "If directory has name, type, or version components, the returned list contains only those pathnames whose name, type, and version components match those of directory; wild or #f as one of these components means “match anything”."
However, it does not appear in reality as if #f means the same thing as 'wild, for example (comparing #f and 'wild in the name field to emulate looking for "*.scm"):
=================================================================
1 ]=> (directory-read (make-pathname #f #f '(absolute "home" "taylor") #f "scm" #f))
;Value: ()
1 ]=> (directory-read (make-pathname #f #f '(absolute "home" "taylor") 'wild "scm" #f))
;Value 448: (#[pathname 449 "/home/taylor/match.scm"] #[pathname 450 "/home/taylor/selector-test.scm"] #[pathname 451 "/home/taylor/validator.scm"] #[pathname 452 "/home/taylor/wiki2html.scm"])
=================================================================
The same goes for making the type field #f vs. 'wild.
|