Function: temporary-file-directory
temporary-file-directory is a byte-compiled function defined in
files.el.gz.
Signature
(temporary-file-directory)
Documentation
The directory for writing temporary files.
In case of a remote default-directory, this is a directory for
temporary files on that remote host. If such a directory does
not exist, or default-directory ought to be located on a
mounted file system (see mounted-file-systems), the function
returns default-directory.
For a non-remote and non-mounted default-directory, the value of
the variable temporary-file-directory(var)/temporary-file-directory(fun) is returned.
Probably introduced at or before Emacs version 20.3.
Source Code
;; Defined in /usr/src/emacs/lisp/files.el.gz
(defun temporary-file-directory ()
"The directory for writing temporary files.
In case of a remote `default-directory', this is a directory for
temporary files on that remote host. If such a directory does
not exist, or `default-directory' ought to be located on a
mounted file system (see `mounted-file-systems'), the function
returns `default-directory'.
For a non-remote and non-mounted `default-directory', the value of
the variable `temporary-file-directory' is returned."
(let ((handler (find-file-name-handler
default-directory 'temporary-file-directory)))
(if handler
(funcall handler 'temporary-file-directory)
(if (string-match mounted-file-systems default-directory)
default-directory
temporary-file-directory))))