Function: tramp-gvfs-get-root-attributes

tramp-gvfs-get-root-attributes is a byte-compiled function defined in tramp-gvfs.el.gz.

Signature

(tramp-gvfs-get-root-attributes FILENAME &optional FILE-SYSTEM)

Documentation

Return GVFS attributes association list of FILENAME.

If FILE-SYSTEM is non-nil, return file system attributes.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp-gvfs.el.gz
(defun tramp-gvfs-get-root-attributes (filename &optional file-system)
  "Return GVFS attributes association list of FILENAME.
If FILE-SYSTEM is non-nil, return file system attributes."
  ;; Don't modify `last-coding-system-used' by accident.
  (let ((last-coding-system-used last-coding-system-used)
	result)
    (with-parsed-tramp-file-name (expand-file-name filename) nil
      (with-tramp-file-property
	  v localname
	  (if file-system "file-system-attributes" "file-attributes")
	(tramp-message
	 v 5 "file%s gvfs attributes: %s"
	 (if file-system " system" "") localname)
	;; Send command.
	(if file-system
	    (tramp-gvfs-info filename "--filesystem")
	  (tramp-gvfs-info filename))
	;; Parse output.
	(with-current-buffer (tramp-get-connection-buffer v)
	  (goto-char (point-min))
	  (while (search-forward-regexp
		  (if file-system
		      tramp-gvfs-file-system-attributes-regexp
		    tramp-gvfs-file-attributes-with-gvfs-info-regexp)
		  nil t)
	    (push (cons (match-string 1) (match-string 2)) result))
	  result)))))