Function: tramp-flush-file-function
tramp-flush-file-function is a 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).
(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 "^\\( \\|\\*\\)" (buffer-name)))
(let ((bfn (if (stringp (buffer-file-name))
(buffer-file-name)
default-directory))
(tramp-verbose 0))
(when (tramp-tramp-file-p bfn)
(with-parsed-tramp-file-name bfn nil
(tramp-flush-file-properties v localname)))))))