If it should, then maybe there is a bug:

TEST> ls -l
total 4
drwxr-xr-x 2 bege users 4096 Oct 25 23:25 dir
lrwxrwxrwx 1 bege users    3 Oct 25 23:25 dir-link -> dir
-rw-r--r-- 1 bege users    0 Oct 25 23:25 file
lrwxrwxrwx 1 bege users    4 Oct 25 23:25 file-link -> file

ECL (Embeddable Common-Lisp) 11.1.1
Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
Copyright (C) 1993 Giuseppe Attardi
Copyright (C) 2000 Juan J. Garcia-Ripoll

> (directory "./*")
(#P"/home/bege/TEST/file" #P"/home/bege/TEST/file")

> (directory "./*" :resolve-symlinks nil)
(#P"/home/bege/TEST/file" #P"/home/bege/TEST/file") ; no difference (file symlinks are resolved)

> (directory "./*/")
(#P"/home/bege/TEST/dir/" #P"/home/bege/TEST/dir/")

> (directory "./*/" :resolve-symlink nil)
(#P"/home/bege/TEST/dir/" #P"/home/bege/TEST/dir/")    ; no difference (directory symlinks are resolved)

Or maybe I just don't know what is the proper keyword as ECL accepts everything.
From ECL's unixfsys.d file:

@(defun directory (mask &key &allow_other_keys)

Furthermore by checking the list_directory function, the resolve-symlink functionality doesn't seem to be implemented:

component_path = file_truename(component_path, component);
kind = VALUES(1);
out = CONS(CONS(component_path, kind), out);

Or maybe I just cannot figure out how to use it...

2011/10/26 Juan Jose Garcia-Ripoll <juanjose.garciaripoll@googlemail.com>
2011/10/26 Gábor Balázs <gabalz@gmail.com>
Is there a way with ECL not to resolve symlinks in directory listings?
Like other Lisp implementations (eg. SBCL) usually have an option like : (directory "/tmp/*" :resolve-symlinks nil)

Same syntax (:resolve-symlinks) should work.


Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)