MCPcopy Index your code
hub / github.com/RustPython/RustPython / _proc_builtin

Method _proc_builtin

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

1373 return self._proc_builtin(tarfile)
1374
1375 def _proc_builtin(self, tarfile):
1376 """Process a builtin type or an unknown type which
1377 will be treated as a regular file.
1378 """
1379 self.offset_data = tarfile.fileobj.tell()
1380 offset = self.offset_data
1381 if self.isreg() or self.type not in SUPPORTED_TYPES:
1382 # Skip the following data blocks.
1383 offset += self._block(self.size)
1384 tarfile.offset = offset
1385
1386 # Patch the TarInfo object with saved global
1387 # header information.
1388 self._apply_pax_info(tarfile.pax_headers, tarfile.encoding, tarfile.errors)
1389
1390 # Remove redundant slashes from directories. This is to be consistent
1391 # with frombuf().
1392 if self.isdir():
1393 self.name = self.name.rstrip("/")
1394
1395 return self
1396
1397 def _proc_gnulong(self, tarfile):
1398 """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