;;; -*- Mode:LISP; Base:10 -*- (defun dired-subdirectory-p (dir-spec subdir-spec) (let* ((parsed-dir (fs:parse-pathname dir-spec)) (parsed-subdir (fs:parse-pathname subdir-spec)) (dirlist (send parsed-dir :raw-directory)) (subdirlist (send parsed-subdir :raw-directory))) (when (listp subdirlist) ;otherwise it's a toplevel dir (if (not (listp dirlist)) (setq dirlist (list dirlist))) (dotimes (i (length subdirlist)) (if (equal dirlist (firstn i subdirlist)) (return t))))))