Function: tramp-sudoedit-handle-file-attributes

tramp-sudoedit-handle-file-attributes is a byte-compiled function defined in tramp-sudoedit.el.gz.

Signature

(tramp-sudoedit-handle-file-attributes FILENAME &optional ID-FORMAT)

Documentation

Like file-attributes for Tramp files.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp-sudoedit.el.gz
(defun tramp-sudoedit-handle-file-attributes (filename &optional id-format)
  "Like `file-attributes' for Tramp files."
  ;; The result is cached in `tramp-convert-file-attributes'.
  (with-parsed-tramp-file-name (expand-file-name filename) nil
    (tramp-convert-file-attributes v localname id-format
      (cond
       ((tramp-sudoedit-remote-selinux-p v)
	(tramp-sudoedit-send-command-and-read
	 v "env" "QUOTING_STYLE=locale" "stat" "-c"
	 tramp-sudoedit-file-attributes-with-selinux
	 (file-name-unquote localname)))
       (t
	(tramp-sudoedit-send-command-and-read
	 v "env" "QUOTING_STYLE=locale" "stat" "-c"
	 tramp-sudoedit-file-attributes (file-name-unquote localname)))))))