Function: dired-rsync--remote-to-from-local-cmd

dired-rsync--remote-to-from-local-cmd is a natively compiled function defined in dired-rsync.el.

Signature

(dired-rsync--remote-to-from-local-cmd SFILES DEST)

Documentation

Construct a rsync command for SFILES to DEST copy.

This handles both remote to local or local to remote copy. Fortunately both forms are broadly the same.

Source Code

;; Defined in /nix/store/i42d1fmg6q3dci37c05j415vhqjrzi15-emacs-packages-deps/share/emacs/site-lisp/elpa/dired-rsync-20261005.758/dired-rsync.el
(defun dired-rsync--remote-to-from-local-cmd (sfiles dest)
  "Construct a rsync command for SFILES to DEST copy.

This handles both remote to local or local to remote copy.
Fortunately both forms are broadly the same."
  (let ((src-files
         (-map 'dired-rsync--quote-and-maybe-convert-from-tramp sfiles))
        (final-dest (dired-rsync--quote-and-maybe-convert-from-tramp dest))
        (ssh-port (-some #'dired-rsync--extract-port-from-tramp
                         (append (list dest) sfiles))))
    (s-join " "
            (-flatten
             (list dired-rsync-command
                   dired-rsync-options
                   (when ssh-port (format "-e 'ssh -p %s'" ssh-port))
                   "--"
                   src-files
                   final-dest)))))