Function: tramp-flush-file-function
tramp-flush-file-function is an autoloaded and byte-compiled function
defined in tramp-cache.el.gz.
Signature
(tramp-flush-file-function)
Documentation
Flush all Tramp cache properties from buffer-file-name(var)/buffer-file-name(fun).
This is suppressed for temporary buffers.
Source Code
;; Defined in /usr/src/emacs/lisp/net/tramp-cache.el.gz
;; Reverting or killing a buffer should also flush file properties.
;; They could have been changed outside Tramp. In eshell, "ls" would
;; not show proper directory contents when a file has been copied or
;; deleted before. We must apply `save-match-data', because it would
;; corrupt other packages otherwise (reported from org).
;;;###tramp-autoload
(defun tramp-flush-file-function ()
"Flush all Tramp cache properties from `buffer-file-name'.
This is suppressed for temporary buffers."
(save-match-data
(unless (or (null (buffer-name))
(string-match-p (rx bos (| blank "*")) (buffer-name)))
(let ((bfn (if (stringp (buffer-file-name))
(buffer-file-name)
default-directory))
(tramp-verbose 0))
(when (tramp-tramp-file-p bfn)
(tramp-flush-file-properties
(tramp-dissect-file-name bfn) (tramp-file-local-name bfn)))))))