From: Mario Frasca
Subject: pathname-directory when pathname is a directory
Date: 
Message-ID: <slrn914n1v.hu0.mario@tamino.cs.uu.nl>
Hi everybody,

I'm working with ACL-5.0 and CMUCL 18b.  I'm trying to write a function
for (sort of) browsing the directory tree and make a choice of a
directory where to stay.

the function I've written only works on CMUCL.  the difference is
in the behaviour of PATHNAME-<field> on the two systems, when the
pathname passed as an argument is a directory.

a concrete example:

cmucl>>
* (directory "/mnt/zip/cltl/")
(#p"/misc/zip/cltl/README" #p"/misc/zip/cltl/clm/"
 #p"/misc/zip/cltl/cltl2.html" #p"/misc/zip/cltl/digital_press/")

* (mapcar #'pathname-directory (directory "/mnt/zip/cltl/"))
((:ABSOLUTE "misc" "zip" "cltl") (:ABSOLUTE "misc" "zip" "cltl" "clm")
 (:ABSOLUTE "misc" "zip" "cltl")
 (:ABSOLUTE "misc" "zip" "cltl" "digital_press"))

* (mapcar #'pathname-name (directory "/mnt/zip/cltl/"))
("README" NIL "cltl2" NIL)

<<

ACL>>
SENS(41): (directory "/users/mario/cltl/")
(#p"/users/mario/cltl/digital_press" #p"/users/mario/cltl/cltl2.html"
 #p"/users/mario/cltl/clm" #p"/users/mario/cltl/README")

SENS(42): (mapcar #'pathname-directory (directory "/users/mario/cltl/"))
((:ABSOLUTE "users" "mario" "cltl") (:ABSOLUTE "users" "mario" "cltl")
 (:ABSOLUTE "users" "mario" "cltl") (:ABSOLUTE "users" "mario" "cltl"))

SENS(43): (mapcar #'pathname-name (directory "/users/mario/cltl/"))
("digital_press" "cltl2" "clm" "README")
<<

my problem now is how to distinguish regular files from directories
within ACL.  as you can see from the example, there appears to be no
difference, whereas cmucl does make one.

thanks in advance for any help/hints

Mario

-- 
Mario Frasca @ Universiteit Utrecht --- http://www.cs.uu.nl/staff/mario.html
From: Mario Frasca
Subject: [solved] Re: pathname-directory when pathname is a directory
Date: 
Message-ID: <slrn9157l1.hu0.mario@tamino.cs.uu.nl>
On 15 Nov 2000 09:49:51 GMT, Mario Frasca <·····@cs.uu.nl> wrote:
>my problem now is how to distinguish regular files from directories
>within ACL.  as you can see from the example, there appears to be no
>difference, whereas cmucl does make one.

sorry, I should have read the *paper* documentation of allegro, instead
of relying on the *online* one, then I would have seen that I can
(should) use the :directories-are-files nil option

anyhow, problem solved!