[Openmcl-devel] #'directory
Sven Van Caekenberghe
sven at beta9.be
Sun Sep 1 06:34:42 PDT 2002
Hi,
I am bit puzzled by the semantics of #'directory. I am looking for a
cross-platform way to use it, but get different results in different
lisp implementations (all on Mac OS X 10.2):
In openmcl 0.13 I have to do this to get a full (files and
subdirectories) directory listing:
? (directory "/Users/sven/*" :directories t)
(#P"/Users/sven/.bash_history" #P"/Users/sven/.bash_profile"
#P"/Users/sven/.bashrc" #P"/Users/sven/.CFUserTextEncoding"
#P"/Users/sven/.codeguide-5.0/" #P"/Users/sven/.DS_Store"
#P"/Users/sven/.emacs" #P"/Users/sven/.emacs.d/" #P"/Users/sven/.ocins"
#P"/Users/sven/.Trash/" #P"/Users/sven/apps/" #P"/Users/sven/bin/"
#P"/Users/sven/cvs/" #P"/Users/sven/Desktop/"
#P"/Users/sven/Documents/" #P"/Users/sven/Library/"
#P"/Users/sven/Movies/" #P"/Users/sven/Music/"
#P"/Users/sven/Pictures/" #P"/Users/sven/Public/"
#P"/Users/sven/Sites/" #P"/Users/sven/Tmp/")
In clisp 2.29 I have to do it with 2 calls it seems:
[1]> (directory "/Users/sven/*")
(#P"/Users/sven/.ocins" #P"/Users/sven/.emacs" #P"/Users/sven/.DS_Store"
#P"/Users/sven/.CFUserTextEncoding" #P"/Users/sven/.bashrc"
#P"/Users/sven/.bash_profile" #P"/Users/sven/.bash_history")
[2]> (directory "/Users/sven/*/")
(#P"/Users/sven/Tmp/" #P"/Users/sven/Sites/" #P"/Users/sven/Public/"
#P"/Users/sven/Pictures/" #P"/Users/sven/Music/"
#P"/Users/sven/Movies/"
#P"/Users/sven/Library/" #P"/Users/sven/Documents/"
#P"/Users/sven/Desktop/"
#P"/Users/sven/cvs/" #P"/Users/sven/bin/" #P"/Users/sven/apps/"
#P"/Users/sven/.Trash/" #P"/Users/sven/.emacs.d/"
#P"/Users/sven/.codeguide-5.0/")
In acl 6.2 no extra arguments are needed:
CL-USER(10): (print (directory "/Users/sven/*"))
(#p"/Users/sven/.bash_history" #p"/Users/sven/.bash_profile"
#p"/Users/sven/.bashrc" #p"/Users/sven/.CFUserTextEncoding"
#p"/Users/sven/.codeguide-5.0" #p"/Users/sven/.DS_Store"
#p"/Users/sven/.emacs" #p"/Users/sven/.emacs.d" #p"/Users/sven/.ocins"
#p"/Users/sven/.Trash" #p"/Users/sven/apps" #p"/Users/sven/bin"
#p"/Users/sven/cvs" #p"/Users/sven/Desktop" #p"/Users/sven/Documents"
#p"/Users/sven/Library" #p"/Users/sven/Movies" #p"/Users/sven/Music"
#p"/Users/sven/Pictures" #p"/Users/sven/Public" #p"/Users/sven/Sites"
#p"/Users/sven/Tmp")
IMHO acl does the most sensible/portable thing, what do you think?
Sven
_______________________________________________
Openmcl-devel mailing list
Openmcl-devel at clozure.com
http://clozure.com/cgi-bin/mailman/listinfo/openmcl-devel
More information about the Openmcl-devel
mailing list