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

Method resolve_dir

Lib/zipfile/_path/__init__.py:125–133  ·  view source on GitHub ↗

If the name represents a directory, return that name as a directory (with the trailing slash).

(self, name)

Source from the content-addressed store, hash-verified

123 return set(self.namelist())
124
125 def resolve_dir(self, name):
126 """
127 If the name represents a directory, return that name
128 as a directory (with the trailing slash).
129 """
130 names = self._name_set()
131 dirname = name + '/'
132 dir_match = name not in names and dirname in names
133 return dirname if dir_match else name
134
135 def getinfo(self, name):
136 """

Callers 1

joinpathMethod · 0.80

Calls 1

_name_setMethod · 0.95

Tested by

no test coverage detected