RosettaCodeData/Task/Check-that-file-exists/Common-Lisp/check-that-file-exists-1.lisp
Ingy döt Net 764da6cbbb CDE
2013-04-10 16:57:12 -07:00

11 lines
490 B
Common Lisp

(if (probe-file (make-pathname :name "input.txt"))
(print "rel file exists"))
(if (probe-file (make-pathname :directory '(:absolute "") :name "input.txt"))
(print "abs file exists"))
(if (directory (make-pathname :directory '(:relative "docs")))
(print "rel directory exists")
(print "rel directory is not known to exist"))
(if (directory (make-pathname :directory '(:absolute "docs")))
(print "abs directory exists")
(print "abs directory is not known to exist"))