Function: tramp-handle-file-readable-p
tramp-handle-file-readable-p is a byte-compiled function defined in
tramp.el.gz.
Signature
(tramp-handle-file-readable-p FILENAME)
Documentation
Like file-readable-p for Tramp files.
Source Code
;; Defined in /usr/src/emacs/lisp/net/tramp.el.gz
(defun tramp-handle-file-readable-p (filename)
"Like `file-readable-p' for Tramp files."
(with-parsed-tramp-file-name (expand-file-name filename) nil
(with-tramp-file-property v localname "file-readable-p"
(or (tramp-check-cached-permissions v ?r)
;; `tramp-check-cached-permissions' doesn't handle symbolic
;; links.
(when-let ((symlink (file-symlink-p filename)))
(and (stringp symlink)
(file-readable-p
(concat (file-remote-p filename) symlink))))))))