Function: tramp-rclone-remote-file-name

tramp-rclone-remote-file-name is a byte-compiled function defined in tramp-rclone.el.gz.

Signature

(tramp-rclone-remote-file-name FILENAME)

Documentation

Return FILENAME as used in the rclone command.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp-rclone.el.gz
;; File name conversions.

(defun tramp-rclone-remote-file-name (filename)
  "Return FILENAME as used in the `rclone' command."
  (setq filename (tramp-compat-file-name-unquote (expand-file-name filename)))
  (if (tramp-rclone-file-name-p filename)
      (with-parsed-tramp-file-name filename nil
	;; As long as we call `tramp-rclone-maybe-open-connection' here,
	;; we cache the result.
	(with-tramp-file-property v localname "remote-file-name"
	  (tramp-rclone-maybe-open-connection v)
	  ;; TODO: This shall be handled by `expand-file-name'.
	  (setq localname
		(replace-regexp-in-string (rx bol ".") "" (or localname "")))
	  (format "%s%s" (tramp-fuse-mounted-p v) localname)))
    ;; It is a local file name.
    filename))