[Openmcl-devel] Another Directory Bug
ww.s2 at ukonline.co.uk
Sat Apr 3 04:56:51 UTC 2010
The Clozure version of directory is a real barrier to porting my code from MCL, as a Common-Lisp function it should just work apart from a few tweaks to pathname protocols. The latest problem is that the Clozure version of the Common-Lisp Function Directory fails to return all volumes on my system. In particular it fails to return the one where the operating system is located. (In my case CCL is located on a partition.) Terminal shows all my partitions of course.
Welcome to Clozure Common Lisp Version 1.4-r13119 (DarwinX8664)!
? (directory "Volumes/*" :directories t :files nil)
(#P"/Volumes/work/" #P"/Volumes/DOS/" #P"/Volumes/play/" #P"/Volumes/public/" #P"/Volumes/plans/" #P"/Volumes/private/" #P"/Volumes/xSpare/")
Doesn't anyone use Directory?
On Mar 28, 2010, at 9:16 PM, wws2 new wrote:
> When trying to use CCL to compare files on two different volumes, I have encountered two problems with the implementation of (Directory ).
> (1) The first is that the CCL (directory ) function fails to work with paths that have "*" in them whether as part of the directory name or as part of the file name, but of course there might be many such files or directories on a macintosh volume, so directory does not fully work.
> Welcome to Clozure Common Lisp Version 1.4-r13119 (DarwinX8664)!
> ? (directory "Volumes/Arbeit/Allegro/**/*.*"
> :directories nil
> :files t
>> Error: Illegal use of wildcarded filename "/Volumes/Arbeit/Allegro/Contribs/MapCooordinates/Classic/*Latitude/"
>> While executing: NATIVE-TRANSLATED-NAMESTRING, in process Listener(6).
>> Type cmd-. to abort, cmd-\ for a list of available restarts.
>> Type :? for other options.
> 1 >
> (2) The second is that (directory ) calls some version of delete-duplicates which starts to crawl-really-slowly (cant complete overnight) when the volume contains hundreds-of-thousands of data files. Surely there should be no duplicates to delete in the first place (even if :follow-links is true), and doing so must be beyond the Common-Lisp spec. The source seems to suggest that the reasons for doing this is extraneous to the common-lisp definition. What do you language experts think?
More information about the Openmcl-devel