Function: file-modes-char-to-who

file-modes-char-to-who is a byte-compiled function defined in files.el.gz.

Signature

(file-modes-char-to-who CHAR)

Documentation

Convert CHAR to a numeric bit-mask for extracting mode bits.

CHAR is in [ugoa] and represents the category of users (Owner, Group, Others, or All) for whom to produce the mask. The bit-mask that is returned extracts from mode bits the access rights for the specified category of users.

Source Code

;; Defined in /usr/src/emacs/lisp/files.el.gz
;; Symbolic modes and read-file-modes.

(defun file-modes-char-to-who (char)
  "Convert CHAR to a numeric bit-mask for extracting mode bits.
CHAR is in [ugoa] and represents the category of users (Owner, Group,
Others, or All) for whom to produce the mask.
The bit-mask that is returned extracts from mode bits the access rights
for the specified category of users."
  (cond ((eq char ?u) #o4700)
	((eq char ?g) #o2070)
	((eq char ?o) #o1007)
	((eq char ?a) #o7777)
        (t (error "%c: Bad `who' character" char))))