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

Method __repr__

tools/python-3.11.9-amd64/Lib/zipfile.py:417–437  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

415 # CRC CRC-32 of the uncompressed file
416
417 def __repr__(self):
418 result = ['<%s filename=%r' % (self.__class__.__name__, self.filename)]
419 if self.compress_type != ZIP_STORED:
420 result.append(' compress_type=%s' %
421 compressor_names.get(self.compress_type,
422 self.compress_type))
423 hi = self.external_attr >> 16
424 lo = self.external_attr & 0xFFFF
425 if hi:
426 result.append(' filemode=%r' % stat.filemode(hi))
427 if lo:
428 result.append(' external_attr=%#x' % lo)
429 isdir = self.is_dir()
430 if not isdir or self.file_size:
431 result.append(' file_size=%r' % self.file_size)
432 if ((not isdir or self.compress_size) and
433 (self.compress_type != ZIP_STORED or
434 self.file_size != self.compress_size)):
435 result.append(' compress_size=%r' % self.compress_size)
436 result.append('>')
437 return ''.join(result)
438
439 def FileHeader(self, zip64=None):
440 """Return the per-file header as a bytes object.

Callers

nothing calls this directly

Calls 4

is_dirMethod · 0.95
appendMethod · 0.45
getMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected