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

Method _proc_builtin

tools/python-3.11.9-amd64/Lib/tarfile.py:1322–1342  ·  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

1320 return self._proc_builtin(tarfile)
1321
1322 def _proc_builtin(self, tarfile):
1323 """Process a builtin type or an unknown type which
1324 will be treated as a regular file.
1325 """
1326 self.offset_data = tarfile.fileobj.tell()
1327 offset = self.offset_data
1328 if self.isreg() or self.type not in SUPPORTED_TYPES:
1329 # Skip the following data blocks.
1330 offset += self._block(self.size)
1331 tarfile.offset = offset
1332
1333 # Patch the TarInfo object with saved global
1334 # header information.
1335 self._apply_pax_info(tarfile.pax_headers, tarfile.encoding, tarfile.errors)
1336
1337 # Remove redundant slashes from directories. This is to be consistent
1338 # with frombuf().
1339 if self.isdir():
1340 self.name = self.name.rstrip("/")
1341
1342 return self
1343
1344 def _proc_gnulong(self, tarfile):
1345 """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