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

Method exists

Lib/test/test_pathlib/support/local_path.py:106–112  ·  view source on GitHub ↗

Whether this path exists.

(self, *, follow_symlinks=True)

Source from the content-addressed store, hash-verified

104 self._is_symlink = None
105
106 def exists(self, *, follow_symlinks=True):
107 """Whether this path exists."""
108 if not follow_symlinks and self.is_symlink():
109 return True
110 if self._exists is None:
111 self._exists = os.path.exists(self._path)
112 return self._exists
113
114 def is_dir(self, *, follow_symlinks=True):
115 """Whether this path is a directory."""

Callers

nothing calls this directly

Calls 1

is_symlinkMethod · 0.95

Tested by

no test coverage detected