Function: tramp-gvfs-activation-uri
tramp-gvfs-activation-uri is a byte-compiled function defined in
tramp-gvfs.el.gz.
Signature
(tramp-gvfs-activation-uri FILENAME)
Documentation
Return activation URI to be used in gio commands.
Source Code
;; Defined in /usr/src/emacs/lisp/net/tramp-gvfs.el.gz
;; File name conversions.
(defun tramp-gvfs-activation-uri (filename)
"Return activation URI to be used in gio commands."
(if (tramp-tramp-file-p filename)
(with-parsed-tramp-file-name filename nil
;; Ensure that media devices are cached.
(when (string-equal method "mtp")
(tramp-get-media-device v))
(with-tramp-connection-property v "activation-uri"
(setq localname "/")
(when (string-equal "gdrive" method)
(setq method "google-drive"))
(when (string-equal "nextcloud" method)
(setq method "davs"
localname
(concat (tramp-gvfs-get-remote-prefix v) localname)))
(when (string-equal "mtp" method)
(when-let
((media (tramp-get-connection-property v "media-device" nil)))
(setq method (tramp-media-device-method media)
host (tramp-media-device-host media)
port (tramp-media-device-port media))))
(when (and user domain)
(setq user (concat domain ";" user)))
(url-recreate-url
(url-parse-make-urlobj
method (and user (url-hexify-string user))
nil (and host (url-hexify-string host))
(if (stringp port) (string-to-number port) port)
localname nil nil t))))
;; Local URI.
(url-recreate-url
(url-parse-make-urlobj "file" nil nil nil nil nil nil nil t))))