MCPcopy
hub / github.com/pytest-dev/pytest / _stat

Method _stat

src/_pytest/_py/path.py:110–118  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

108 _statcache: Stat
109
110 def _stat(self) -> Stat:
111 try:
112 return self._statcache
113 except AttributeError:
114 try:
115 self._statcache = self.path.stat()
116 except error.ELOOP:
117 self._statcache = self.path.lstat()
118 return self._statcache
119
120 def dir(self):
121 return S_ISDIR(self._stat().mode)

Callers 3

dirMethod · 0.95
fileMethod · 0.95
existsMethod · 0.95

Calls 2

statMethod · 0.80
lstatMethod · 0.80

Tested by

no test coverage detected