v 'file-error
(concat "Method `%s' should specify both encoding and "
"decoding command or an scp program")
- method))))
-
- ;; Make `last-coding-system-used' have the right value.
- (when coding-system-used
- (setq last-coding-system-used coding-system-used)))))))
+ method)))))))))
+(defun tramp-bundle-read-file-names (vec files)
+ "Read file attributes of FILES and with one command fill the cache.
+FILES must be the local names only. The cache attributes to be
+filled are described in `tramp-bundle-read-file-names'."
+ (when files
+ (tramp-maybe-send-script
+ vec
+ (format tramp-bundle-read-file-names
+ (tramp-get-file-exists-command vec)
+ (format "%s -r" (tramp-get-test-command vec))
+ (format "%s -d" (tramp-get-test-command vec)))
+ "tramp_bundle_read_file_names")
+
+ (dolist
+ (elt
+ (ignore-errors
+ ;; We cannot use `tramp-send-command-and-read', because
+ ;; this does not cooperate well with heredoc documents.
+ (tramp-send-command
+ vec
+ (format
+ "tramp_bundle_read_file_names <<'%s'\n%s\n%s\n"
+ tramp-end-of-heredoc
+ (mapconcat #'tramp-shell-quote-argument
+ files
+ "\n")
+ tramp-end-of-heredoc))
+ (with-current-buffer (tramp-get-connection-buffer vec)
+ ;; Read the expression.
+ (goto-char (point-min))
+ (read (current-buffer)))))
+
+ (tramp-set-file-property
+ vec (car elt) (cadr elt) (cadr (cdr elt))))))
+
(defvar tramp-vc-registered-file-names nil
"List used to collect file names, which are checked during `vc-registered'.")