Function: tramp-handle-file-symlink-p

tramp-handle-file-symlink-p is a byte-compiled function defined in tramp.el.gz.

Signature

(tramp-handle-file-symlink-p FILENAME)

Documentation

Like file-symlink-p for Tramp files.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp.el.gz
(defun tramp-handle-file-symlink-p (filename)
  "Like `file-symlink-p' for Tramp files."
  (with-parsed-tramp-file-name (expand-file-name filename) nil
    ;; Some operations, like `file-truename', set the file property
    ;; "file-symlink-marker".  We can use it as indicator, and avoid a
    ;; possible call of `file-attributes'.
    (when (or (tramp-get-file-property v localname "file-symlink-marker")
	      (not (tramp-file-property-p v localname "file-symlink-marker")))
      (let ((x (file-attribute-type (file-attributes filename))))
	(and (stringp x) x)))))