Function: tramp-adb-handle-file-attributes

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

Signature

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

Documentation

Like file-attributes for Tramp files.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp-adb.el.gz
(defun tramp-adb-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 filename nil
    (tramp-convert-file-attributes v localname id-format
      (and
       (tramp-adb-send-command-and-check
	v (format "(%s -d -l %s; echo tramp_exit_status $?) | cat"
		  (tramp-adb-get-ls-command v)
		  (tramp-shell-quote-argument localname))
        nil t)
       (with-current-buffer (tramp-get-buffer v)
	 (tramp-adb-sh-fix-ls-output)
	 (cdar (tramp-do-parse-file-attributes-with-ls v)))))))