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

Method _block

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

Round up a byte count by BLOCKSIZE and return it, e.g. _block(834) => 1024.

(self, count)

Source from the content-addressed store, hash-verified

1565 return value.decode(fallback_encoding, fallback_errors)
1566
1567 def _block(self, count):
1568 """Round up a byte count by BLOCKSIZE and return it,
1569 e.g. _block(834) => 1024.
1570 """
1571 blocks, remainder = divmod(count, BLOCKSIZE)
1572 if remainder:
1573 blocks += 1
1574 return blocks * BLOCKSIZE
1575
1576 def isreg(self):
1577 'Return True if the Tarinfo object is a regular file.'

Callers 4

_proc_builtinMethod · 0.95
_proc_gnulongMethod · 0.95
_proc_sparseMethod · 0.95
_proc_paxMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected