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

Method getmember

tools/python-3.11.9-amd64/Lib/tarfile.py:1978–1987  ·  view source on GitHub ↗

Return a TarInfo object for member `name'. If `name' can not be found in the archive, KeyError is raised. If a member occurs more than once in the archive, its last occurrence is assumed to be the most up-to-date version.

(self, name)

Source from the content-addressed store, hash-verified

1976 self.fileobj.close()
1977
1978 def getmember(self, name):
1979 """Return a TarInfo object for member `name'. If `name' can not be
1980 found in the archive, KeyError is raised. If a member occurs more
1981 than once in the archive, its last occurrence is assumed to be the
1982 most up-to-date version.
1983 """
1984 tarinfo = self._getmember(name.rstrip('/'))
1985 if tarinfo is None:
1986 raise KeyError("filename %r not found" % name)
1987 return tarinfo
1988
1989 def getmembers(self):
1990 """Return the members of the archive as a list of TarInfo objects. The

Callers 2

_get_extract_tarinfoMethod · 0.95
extractfileMethod · 0.95

Calls 2

_getmemberMethod · 0.95
rstripMethod · 0.45

Tested by

no test coverage detected