Function: tramp-sudoedit-handle-set-file-acl

tramp-sudoedit-handle-set-file-acl is a byte-compiled function defined in tramp-sudoedit.el.gz.

Signature

(tramp-sudoedit-handle-set-file-acl FILENAME ACL-STRING)

Documentation

Like set-file-acl for Tramp files.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp-sudoedit.el.gz
(defun tramp-sudoedit-handle-set-file-acl (filename acl-string)
  "Like `set-file-acl' for Tramp files."
  (with-parsed-tramp-file-name (expand-file-name filename) nil
    (when (and (stringp acl-string) (tramp-sudoedit-remote-acl-p v))
      ;; Massage `acl-string'.
      (setq acl-string (string-join (split-string acl-string "\n" 'omit) ","))
      (prog1
	  (tramp-sudoedit-send-command
	   v "setfacl" "-m"
	   acl-string (tramp-compat-file-name-unquote localname))
	(tramp-flush-file-property v localname "file-acl")))))