Function: system-groups

system-groups is a function defined in dired.c.

Signature

(system-groups)

Documentation

Return a list of user group names currently registered in the system.

The value may be nil if not supported on this platform.

View in manual

Probably introduced at or before Emacs version 24.3.

Source Code

// Defined in /usr/src/emacs/src/dired.c
{
  Lisp_Object groups = Qnil;
#if defined HAVE_GETGRENT && defined HAVE_ENDGRENT
  struct group *gr;

  while ((gr = getgrent ()))
    groups = Fcons (DECODE_SYSTEM (build_string (gr->gr_name)), groups);

  endgrent ();
#endif
  return groups;
}