;;; ;;; $Header: /home/gene/library/website/docsrc/pathnames-0/RCS/traverse.lisp,v 395.1 2008/04/20 17:25:56 gene Exp $ ;;; (defun wildcard-dir (pn) "PN is the pathname of a directory itself. In other words, (pathname-name pn) returns a string, not :WILD or another wildcard. WILDCARD-DIR returns a new pathname that matches the names in directory PN." (make-pathname :directory (append (pathname-directory pn) (list (pathname-name pn))) :name :wild)) (defun traverse (root) (do ((x (list root) (rest (append x (directory (wildcard-dir (first x)))))) (count 0 (1+ count))) ((endp x) count) (format t "~&~A" (namestring (first x))))) ;;; --- end of file ---