Function: tramp-handle-file-name-directory
tramp-handle-file-name-directory is a byte-compiled function defined
in tramp.el.gz.
Signature
(tramp-handle-file-name-directory FILE)
Documentation
Like file-name-directory for Tramp files.
Source Code
;; Defined in /usr/src/emacs/lisp/net/tramp.el.gz
(defun tramp-handle-file-name-directory (file)
"Like `file-name-directory' for Tramp files."
;; Everything except the last filename thing is the directory. We
;; cannot apply `with-parsed-tramp-file-name', because this expands
;; the remote file name parts. Suppress adding a hop to
;; `tramp-default-proxies-alist' due to non-expanded default values.
(let ((v (tramp-dissect-file-name file t))
(tramp-default-proxies-alist tramp-cache-undefined))
;; Run the command on the localname portion only. If this returns
;; nil, mark also the localname part of `v' as nil.
(tramp-make-tramp-file-name
v (or (tramp-run-real-handler
#'file-name-directory (list (tramp-file-name-localname v)))
'noloc))))