[Openmcl-devel] #'directoryp

Sven Van Caekenberghe sven at beta9.be
Sun Sep 1 13:40:27 UTC 2002


Hi,

I found no simple way in ANSI common lisp to find out whether a file is 
a directory.
In some old mcl documentation I found a function called directoryp.
This function is part of openmcl, but is unimplemented (throws a break).
Should it be implemented or removed ?

I was using this implementation, but maybe it is too simple:

(defun directory-p (filename)
   (let ((pathname (pathname filename)))
     (and (null (pathname-name pathname))
             (null (pathname-type pathname)))))

This seems to work for my purposes on openmcl.

---
Sven Van Caekenberghe - mailto:sven at beta9.be
Beta Nine - software engineering - http://www.beta9.be
---


_______________________________________________
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