[cmucl-imp] DIRECTORY and symlinks

Helmut Eller heller at common-lisp.net
Sat Dec 1 18:41:55 UTC 2012


On Sat, Dec 01 2012, Faré wrote:

>>> Ooes (directory "/tmp/*.*" :truenamep nil) do what you want?
>>
>> Yes, that's better.  It should probably be the default.
>>
> It can't be the default: the standard mandates truenames.

Does the standard specify what the truename of a dead symlink is?  The
glossary says:

truename n. 
  1. the canonical filename of a file in the file system. See
     Section 20.1.3 (Truenames). 
  2. a pathname representing a truename[1].

My file system in this case is Linux tempfs.  It seems reasonable to
assume that all files returned by readdir(3) have a "canonical
filename", namely the value of the d_name slot of the dirent structure.
I also don't see the harm if CMUCL chooses to define the "canonical
filename" of a dead link as just the link itself.

> On the other hand, you could be using asdf-utils:directory* as a
> portable solution. asdf-utils has many utilities to survive CL
> pathname hell.

Well, asdf-utils:directory* is full of #+.  That's the kind of code I
like to avoid.

Helmut



More information about the cmucl-imp mailing list