Function: tramp-make-tramp-temp-file
tramp-make-tramp-temp-file is a byte-compiled function defined in
tramp.el.gz.
Signature
(tramp-make-tramp-temp-file VEC)
Documentation
Create a temporary file on the remote host identified by VEC.
Return the local name of the temporary file.
Source Code
;; Defined in /usr/src/emacs/lisp/net/tramp.el.gz
(defun tramp-make-tramp-temp-file (vec)
"Create a temporary file on the remote host identified by VEC.
Return the local name of the temporary file."
(let (result)
(while (not result)
;; `make-temp-file' would be the natural choice for
;; implementation. But it calls `write-region' internally,
;; which also needs a temporary file - we would end in an
;; infinite loop.
(setq result (tramp-make-tramp-temp-name vec))
(if (file-exists-p result)
(setq result nil)
;; This creates the file by side effect.
(set-file-times result)
(set-file-modes result #o0700)))
;; Return the local part.
(tramp-file-local-name result)))