MCPcopy Index your code
hub / github.com/python/cpython / is_dir

Method is_dir

Lib/zipfile/__init__.py:679–689  ·  view source on GitHub ↗

Return True if this archive member is a directory.

(self)

Source from the content-addressed store, hash-verified

677 return self
678
679 def is_dir(self):
680 """Return True if this archive member is a directory."""
681 if self.filename.endswith('/'):
682 return True
683 # The ZIP format specification requires to use forward slashes
684 # as the directory separator, but in practice some ZIP files
685 # created on Windows can use backward slashes. For compatibility
686 # with the extraction code which already handles this:
687 if os.path.altsep:
688 return self.filename.endswith((os.path.sep, os.path.altsep))
689 return False
690
691
692# ZIP encryption uses the CRC32 one-byte primitive for scrambling some

Callers 5

__repr__Method · 0.95
mkdirMethod · 0.95
_extract_memberMethod · 0.45
writeMethod · 0.45
load_tzdataFunction · 0.45

Calls 1

endswithMethod · 0.45

Tested by

no test coverage detected