MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _get_gid

Function _get_gid

tools/python-3.11.9-amd64/Lib/shutil.py:891–907  ·  view source on GitHub ↗

Returns a gid, given a group name.

(name)

Source from the content-addressed store, hash-verified

889 return hasattr(st, 'st_flags') and st.st_flags in immutable_states
890
891def _get_gid(name):
892 """Returns a gid, given a group name."""
893 if name is None:
894 return None
895
896 try:
897 from grp import getgrnam
898 except ImportError:
899 return None
900
901 try:
902 result = getgrnam(name)
903 except KeyError:
904 result = None
905 if result is not None:
906 return result[2]
907 return None
908
909def _get_uid(name):
910 """Returns an uid, given a user name."""

Callers 2

_make_tarballFunction · 0.70
chownFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected