Function: tramp-skeleton-file-exists-p
tramp-skeleton-file-exists-p is a macro defined in tramp.el.gz.
Signature
(tramp-skeleton-file-exists-p FILENAME &rest BODY)
Documentation
Skeleton for tramp-*-handle-file-exists-p.
BODY is the backend specific code.
Source Code
;; Defined in /usr/src/emacs/lisp/net/tramp.el.gz
(defmacro tramp-skeleton-file-exists-p (filename &rest body)
"Skeleton for `tramp-*-handle-file-exists-p'.
BODY is the backend specific code."
(declare (indent 1) (debug t))
;; `file-exists-p' is used as predicate in file name completion.
`(or (and minibuffer-completing-file-name
(file-name-absolute-p ,filename)
(tramp-string-empty-or-nil-p
(tramp-file-name-localname (tramp-dissect-file-name ,filename))))
;; We don't want to run it when `non-essential' is t, or there
;; is no connection process yet.
(when (tramp-connectable-p ,filename)
(with-parsed-tramp-file-name (expand-file-name ,filename) nil
(with-tramp-file-property v localname "file-exists-p"
(if (tramp-file-property-p v localname "file-attributes")
(not
(null (tramp-get-file-property v localname "file-attributes")))
,@body))))))