Subject: testing for a directory in clisp

From: Heinrich Taube <[email-masked]>
Date: Mon, 4 Dec 95 09:57:12 -0600

Im porting a large install script  to clisp, and I need to be able to check that a user has specified a  
directory that really exists.  In ACL, GCL and MCL, I do this by:
	>  (probe-file "/tmp")
	#"/tmp"
but this causes an error (!) in clisp.   How do  I test for a directory?

> (probe-file "/tmp")

*** - NAMESTRING: "/tmp" names a directory, not a file
1. Break> (probe-file (make-pathname :directory "/tmp"))

*** - MAKE-PATHNAME: illegal :DIRECTORY argument "/tmp"
2. Break> (directory "/tmp")

*** - NAMESTRING: "/tmp" names a directory, not a file

---

From: Marcus Daniels <[email-masked]>
Date: Tue, 5 Dec 1995 00:16:02 GMT

>>>>> "HT" == Heinrich Taube <[email-masked]> writes:

HT> Im porting a large install script to clisp, and I need to be able
HT> to check that a user has specified a directory that really exists.
HT> In ACL, GCL and MCL, I do this by: (probe-file "/tmp")
HT> 	#"/tmp" but this causes an error (!) in clisp.  How do I test
HT> for a directory?

In contrast to ACL, GCL, and MCL, CMU Lisp and CLISP require
pathname strings to have a trailing slash, "/tmp/".  Alternatively, you can use
MAKE-PATHNAME; use the list form:
  (make-pathname :directory '(:absolute "tmp"))

But you make a point: the CL ANS says that string arguments to :directory 
should be automatically be converted to (:absolute string), so
I will change this.  Thanks.