Function: tramp-get-local-gid

tramp-get-local-gid is a byte-compiled function defined in tramp.el.gz.

Signature

(tramp-get-local-gid ID-FORMAT)

Documentation

The gid of the local user, in ID-FORMAT.

ID-FORMAT valid values are string and integer.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp.el.gz
(defun tramp-get-local-gid (id-format)
  "The gid of the local user, in ID-FORMAT.
ID-FORMAT valid values are `string' and `integer'."
  ;; We use key nil for local connection properties.
  (with-tramp-connection-property nil (format "gid-%s" id-format)
    (cond
     ((equal id-format 'integer) (group-gid))
     ;; `group-name' has been introduced with Emacs 27.1.
     ((and (fboundp 'group-name) (equal id-format 'string))
      (tramp-compat-funcall 'group-name (group-gid)))
     ((tramp-compat-file-attribute-group-id
       (file-attributes "~/" id-format))))))