Function: set-file-extended-attributes
set-file-extended-attributes is a byte-compiled function defined in
files.el.gz.
Signature
(set-file-extended-attributes FILENAME ATTRIBUTES)
Documentation
Set extended attributes of file FILENAME to ATTRIBUTES.
ATTRIBUTES must be an alist of file attributes as returned by
file-extended-attributes.
Value is t if the function succeeds in setting the attributes.
Other relevant functions are documented in the file group.
Probably introduced at or before Emacs version 24.4.
Shortdoc
;; file
(set-file-extended-attributes "/tmp/foo" '((acl . "group::rxx")))
e.g. => t
Source Code
;; Defined in /usr/src/emacs/lisp/files.el.gz
(defun set-file-extended-attributes (filename attributes)
"Set extended attributes of file FILENAME to ATTRIBUTES.
ATTRIBUTES must be an alist of file attributes as returned by
`file-extended-attributes'.
Value is t if the function succeeds in setting the attributes."
(let (result rv)
(dolist (elt attributes)
(let ((attr (car elt))
(val (cdr elt)))
(cond ((eq attr 'acl)
(setq rv (set-file-acl filename val)))
((eq attr 'selinux-context)
(setq rv (set-file-selinux-context filename val))))
(setq result (or result rv))))
result))