Function: tramp-set-file-property

tramp-set-file-property is an autoloaded and byte-compiled function defined in tramp-cache.el.gz.

Signature

(tramp-set-file-property KEY FILE PROPERTY VALUE)

Documentation

Set the PROPERTY of FILE to VALUE, in the cache context of KEY.

Return VALUE.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp-cache.el.gz
;;;###tramp-autoload
(defun tramp-set-file-property (key file property value)
  "Set the PROPERTY of FILE to VALUE, in the cache context of KEY.
Return VALUE."
  ;; Unify localname.  Remove hop from `tramp-file-name' structure.
  (setq key (tramp-file-name-unify key file))
  (if (eq key tramp-cache-undefined) value
    (let ((hash (tramp-get-hash-table key)))
      ;; We put the timestamp there.
      (puthash property (cons (current-time) value) hash)
      (tramp-message
       key 8 "%s %s %s" (tramp-file-name-localname key) property value)
      ;; For analysis purposes, count the number of setting this file attribute.
      (when (>= tramp-verbose 10)
	(let* ((var (intern (concat "tramp-cache-set-count-" property)))
	       (val (or (and (boundp var) (numberp (symbol-value var))
			     (symbol-value var))
			0)))
	  (set var (1+ val))))
      value)))