Function: tramp-adb-handle-file-system-info
tramp-adb-handle-file-system-info is a byte-compiled function defined
in tramp-adb.el.gz.
Signature
(tramp-adb-handle-file-system-info FILENAME)
Documentation
Like file-system-info for Tramp files.
Source Code
;; Defined in /usr/src/emacs/lisp/net/tramp-adb.el.gz
(defun tramp-adb-handle-file-system-info (filename)
"Like `file-system-info' for Tramp files."
(ignore-errors
(with-parsed-tramp-file-name (expand-file-name filename) nil
(tramp-message v 5 "file system info: %s" localname)
(tramp-adb-send-command
v (format "df -k %s" (tramp-shell-quote-argument localname)))
(with-current-buffer (tramp-get-connection-buffer v)
(goto-char (point-min))
(forward-line)
(when (looking-at
(rx (* blank) (+ (not blank))
(+ blank) (group (+ digit))
(+ blank) (group (+ digit))
(+ blank) (group (+ digit))))
;; The values are given as 1k numbers, so we must change
;; them to number of bytes.
(list (* 1024 (string-to-number (match-string 1)))
;; The second value is the used size. We need the
;; free size.
(* 1024 (- (string-to-number (match-string 1))
(string-to-number (match-string 2))))
(* 1024 (string-to-number (match-string 3)))))))))