[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
testing for a directory in clisp
>>>>> "HT" == Heinrich Taube <firstname.lastname@example.org> 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.