Function: dired--find-topmost-parent-dir
dired--find-topmost-parent-dir is a byte-compiled function defined in
dired-aux.el.gz.
Signature
(dired--find-topmost-parent-dir FILENAME)
Documentation
Return the topmost nonexistent parent dir of FILENAME.
FILENAME is a full file name.
Source Code
;; Defined in /usr/src/emacs/lisp/dired-aux.el.gz
;; We use this function in `dired-create-directory' and
;; `dired-create-empty-file'; the return value is the new entry
;; in the updated Dired buffer.
(defun dired--find-topmost-parent-dir (filename)
"Return the topmost nonexistent parent dir of FILENAME.
FILENAME is a full file name."
(let ((try filename) new)
(while (and try (not (file-exists-p try)) (not (equal new try)))
(setq new try
try (directory-file-name (file-name-directory try))))
new))