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

Method _proc_builtin

Lib/tarfile.py:1394–1414  ·  view source on GitHub ↗

Process a builtin type or an unknown type which will be treated as a regular file.

(self, tarfile)

Source from the content-addressed store, hash-verified

1392 return self._proc_builtin(tarfile)
1393
1394 def _proc_builtin(self, tarfile):
1395 """Process a builtin type or an unknown type which
1396 will be treated as a regular file.
1397 """
1398 self.offset_data = tarfile.fileobj.tell()
1399 offset = self.offset_data
1400 if self.isreg() or self.type not in SUPPORTED_TYPES:
1401 # Skip the following data blocks.
1402 offset += self._block(self.size)
1403 tarfile.offset = offset
1404
1405 # Patch the TarInfo object with saved global
1406 # header information.
1407 self._apply_pax_info(tarfile.pax_headers, tarfile.encoding, tarfile.errors)
1408
1409 # Remove redundant slashes from directories. This is to be consistent
1410 # with frombuf().
1411 if self.isdir():
1412 self.name = self.name.rstrip("/")
1413
1414 return self
1415
1416 def _proc_gnulong(self, tarfile):
1417 """Process the blocks that hold a GNU longname

Callers 1

_proc_memberMethod · 0.95

Calls 6

isregMethod · 0.95
_blockMethod · 0.95
_apply_pax_infoMethod · 0.95
isdirMethod · 0.95
tellMethod · 0.45
rstripMethod · 0.45

Tested by

no test coverage detected