Function: tramp-sh-handle-file-executable-p

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

Signature

(tramp-sh-handle-file-executable-p FILENAME)

Documentation

Like file-executable-p for Tramp files.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp-sh.el.gz
;; Simple functions using the `test' command.

(defun tramp-sh-handle-file-executable-p (filename)
  "Like `file-executable-p' for Tramp files."
  (with-parsed-tramp-file-name (expand-file-name filename) nil
    (with-tramp-file-property v localname "file-executable-p"
      ;; Examine `file-attributes' cache to see if request can be
      ;; satisfied without remote operation.
      (or (tramp-check-cached-permissions v ?x)
	  (tramp-check-cached-permissions v ?s)
	  (tramp-check-cached-permissions v ?t)
	  (tramp-run-test v "-x" localname)))))