[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Modifying DIRECTORY
The Allegro (4.1) CL version of the function DIRECTORY returns its
list of pathnames in modification-date order (ala ls -c). I'm using
code written elsewhere which uses this function, but assumes the
pathnames are in alphabetical order. The Allegro Manual warns against
messing with the package-lock system, but can anyone tell me what sort
of disaster I might be courting by doing the following?
(let ((oldirectory (symbol-function 'directory)))
(excl:without-package-locks
(defun DIRECTORY (&rest args)
(sort
(apply oldirectory args)
#'string-lessp
:key #'file-namestring))
)
)
-Jeff B.
Jeff Berger |USmail: Ryerson 256
berger@cs.uchicago.edu | Artificial Intelligence Lab
PH: (312) 702-8584 | 1100 East 58th Street
FX: (312) 702-8487 | Chicago, IL 60637