Function: tramp-flush-file-upper-properties

tramp-flush-file-upper-properties is a byte-compiled function defined in tramp-cache.el.gz.

Signature

(tramp-flush-file-upper-properties KEY FILE)

Documentation

Remove some properties of FILE's upper directory.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp-cache.el.gz
(defun tramp-flush-file-upper-properties (key file)
  "Remove some properties of FILE's upper directory."
  (when (file-name-absolute-p file)
    ;; `file-name-directory' can return nil, for example for "~".
    (when-let ((file (file-name-directory file))
	       (file (directory-file-name file)))
      ;; Unify localname.  Remove hop from `tramp-file-name' structure.
      (setq key (tramp-file-name-unify key file))
      (unless (eq key tramp-cache-undefined)
	(dolist (property (hash-table-keys (tramp-get-hash-table key)))
	  (when (string-match-p
		 (rx
		  bos (| "directory-" "file-name-all-completions"
			 "file-entries"))
		 property)
	    (tramp-flush-file-property key file property)))))))