Function: tramp-fuse-mounted-p

tramp-fuse-mounted-p is a byte-compiled function defined in tramp-fuse.el.gz.

Signature

(tramp-fuse-mounted-p VEC)

Documentation

Check, whether fuse volume determined by VEC is mounted.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp-fuse.el.gz
(defun tramp-fuse-mounted-p (vec)
  "Check, whether fuse volume determined by VEC is mounted."
  ;; Remember the mount status by using a file property on "/",
  ;; instead of using a connection property, because a file property
  ;; has a timeout.  Having a timeout lets us regularly recheck the
  ;; mount status, as requested by `tramp-fuse-mount-timeout'.  We
  ;; cannot use `with-tramp-file-property', because we don't want to
  ;; cache a nil result.
  (let ((remote-file-name-inhibit-cache tramp-fuse-mount-timeout))
    (or (tramp-get-file-property vec "/" "mounted" nil)
        (let* ((default-directory tramp-compat-temporary-file-directory)
               (command (format "mount -t fuse.%s" (tramp-file-name-method vec)))
	       (mount (shell-command-to-string command)))
          (tramp-message vec 6 "%s\n%s" command mount)
          (tramp-set-file-property
	   vec "/" "mounted"
           (when (string-match
                  (format
                   "^\\(%s\\)\\s-" (regexp-quote (tramp-fuse-mount-spec vec)))
                  mount)
             (match-string 1 mount)))))))