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

Method is_dir

tools/python-3.11.9-amd64/Lib/zipfile.py:560–570  ·  view source on GitHub ↗

Return True if this archive member is a directory.

(self)

Source from the content-addressed store, hash-verified

558 return zinfo
559
560 def is_dir(self):
561 """Return True if this archive member is a directory."""
562 if self.filename.endswith('/'):
563 return True
564 # The ZIP format specification requires to use forward slashes
565 # as the directory separator, but in practice some ZIP files
566 # created on Windows can use backward slashes. For compatibility
567 # with the extraction code which already handles this:
568 if os.path.altsep:
569 return self.filename.endswith((os.path.sep, os.path.altsep))
570 return False
571
572
573# ZIP encryption uses the CRC32 one-byte primitive for scrambling some

Callers 2

__repr__Method · 0.95
mkdirMethod · 0.95

Calls 1

endswithMethod · 0.80

Tested by

no test coverage detected