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

Method write

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

Write string s to the stream.

(self, s)

Source from the content-addressed store, hash-verified

432 self.__write(self.name.encode("iso-8859-1", "replace") + NUL)
433
434 def write(self, s):
435 """Write string s to the stream.
436 """
437 if self.comptype == "gz":
438 self.crc = self.zlib.crc32(s, self.crc)
439 self.pos += len(s)
440 if self.comptype != "tar":
441 s = self.cmp.compress(s)
442 self.__write(s)
443
444 def __write(self, s):
445 """Write string s to the stream if a whole new block

Callers 7

copyfileobjFunction · 0.45
writeMethod · 0.45
__writeMethod · 0.45
closeMethod · 0.45
__init__Method · 0.45
closeMethod · 0.45
addfileMethod · 0.45

Calls 2

__writeMethod · 0.95
compressMethod · 0.80

Tested by

no test coverage detected