Re: questions about directory function

Pascal Bourguignon <[email protected]> Sat, 27 Jan 2018 17:23:23 +0100
Newsgroups gmane.lisp.clisp.general
Message-ID <[email protected]>

> On 27 Jan 2018, at 16:37, Don Cohen <[email protected]> wrote:
> 
> 
> Impnotes says:
> (DIRECTORY "/etc/*/") lists all subdirectories in the directory #P"/etc/".
> 
> In my current build (on linux)
> (directory "/etc/*/")
> [../src/pathname.d:7223] 
> *** - OS-FILE-ERROR(ENOENT): No such file or directory
> 
> (DIRECTORY "/etc/*") lists all regular files in the directory #P"/etc/"
> This does work, btw.
> 
> However the results I find somewhat surprising:
> The symbolic link
>  grub2.cfg -> ../boot/grub2/grub.cfg
> shows up as
>  #P"/boot/grub2/grub.cfg"
> Somehow I expected /etc/grub2.cfg.
> 
> What are the arguments for either choice?
> Perhaps this should be mentioned in impnotes.
> 
> I see I can get both paths from the :full option.
> 

The Common Lisp Standard specifies that directory shall return TRUENAMEs.
For symbolic links, the TRUENAME is customarily the target of the symbolic link.

-- 
__Pascal J. Bourguignon__



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
clisp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-list