MCPcopy Index your code
hub / github.com/python/cpython / getmember

Method getmember

Lib/tarfile.py:2134–2143  ·  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

2132 self.fileobj.close()
2133
2134 def getmember(self, name):
2135 """Return a TarInfo object for member 'name'. If 'name' can not be
2136 found in the archive, KeyError is raised. If a member occurs more
2137 than once in the archive, its last occurrence is assumed to be the
2138 most up-to-date version.
2139 """
2140 tarinfo = self._getmember(name.rstrip('/'))
2141 if tarinfo is None:
2142 raise KeyError("filename %r not found" % name)
2143 return tarinfo
2144
2145 def getmembers(self):
2146 """Return the members of the archive as a list of TarInfo objects. The

Callers 15

_get_extract_tarinfoMethod · 0.95
extractfileMethod · 0.95
test_fileobj_iterMethod · 0.80
test_fileobj_seekMethod · 0.80
add_dir_and_getmemberMethod · 0.80
test_v7_dirtypeMethod · 0.80
test_xstar_typeMethod · 0.80

Calls 2

_getmemberMethod · 0.95
rstripMethod · 0.45

Tested by 15

test_fileobj_iterMethod · 0.64
test_fileobj_seekMethod · 0.64
add_dir_and_getmemberMethod · 0.64
test_v7_dirtypeMethod · 0.64
test_xstar_typeMethod · 0.64
test_find_regtypeMethod · 0.64
test_find_conttypeMethod · 0.64