wildcards are not working as expected
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ASDF |
New
|
Undecided
|
Unassigned |
Bug Description
(Originally, I wanted to look more into symlinks but I found that even without symlinks, things don't work as expected, so I started with a simpler problem)
uiop/pathname provides all kinds of wildcards, which I assume are meant to be used with `directory` (note that `uiop:directory*` essentially just adds logic related to symlinks on top of that).
So I tested a few things. Merging with *wild-inferiors*, *wild-file*, *wild-file-
I've looked at 9 lisp implementations of which I'll ignore clisp (it deviates so far from the rest, I won't even try to understand it) and abcl (which appears to have some rather fundamental problems; I can't tell yet if they're in uiop or abcl itself). That still leaves ccl/sbcl/cmucl, ecl/mkcl, allegro, lispworks.
The first thing to note is that *wild-file-
The second thing is that both will always (except on ecl!) list files *and* directories. That is both surprising and inconsistent (because of ecl). This applies to `wilden` as well.
(As long as these problems exist, we cannot expect functions like `directory-files` to work reliably).
Well, *wild-file- for-directory* being different from *wild-file* only clisp and gcl, indeed if you decide to exclude clisp and gcl it won't seem like a useful distinction. But it is a useful distinction, because clisp and gcl are different indeed.
Also, the discrepancies between implementations are large enough that I fear you might not be able to abstract much of a portable behavior beyond what UIOP achieves at great costs. People who really care about portability will probably use IOLib or something like that.