Function: tramp-skeleton-set-file-modes-times-uid-gid
tramp-skeleton-set-file-modes-times-uid-gid is a macro defined in
tramp.el.gz.
Signature
(tramp-skeleton-set-file-modes-times-uid-gid FILENAME &rest BODY)
Documentation
Skeleton for tramp-*-set-file-{modes,times,uid-gid}.
BODY is the backend specific code.
Source Code
;; Defined in /usr/src/emacs/lisp/net/tramp.el.gz
(defmacro tramp-skeleton-set-file-modes-times-uid-gid
(filename &rest body)
"Skeleton for `tramp-*-set-file-{modes,times,uid-gid}'.
BODY is the backend specific code."
(declare (indent 1) (debug t))
`(with-parsed-tramp-file-name (expand-file-name ,filename) nil
(when (not (file-exists-p ,filename))
(tramp-error v 'file-missing ,filename))
(with-tramp-saved-file-properties
v localname
;; We cannot add "file-attributes", "file-executable-p",
;; "file-ownership-preserved-p", "file-readable-p",
;; "file-writable-p".
'("file-directory-p" "file-exists-p" "file-symlink-p" "file-truename")
(tramp-flush-file-properties v localname))
(condition-case err
(progn ,@body)
(error (if tramp-inhibit-errors-if-setting-file-attributes-fail
(display-warning 'tramp (error-message-string err))
(signal (car err) (cdr err)))))))