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

Method exists

Lib/pathlib/__init__.py:861–870  ·  view source on GitHub ↗

Whether this path exists. This method normally follows symlinks; to check whether a symlink exists, add the argument follow_symlinks=False.

(self, *, follow_symlinks=True)

Source from the content-addressed store, hash-verified

859 return os.lstat(self)
860
861 def exists(self, *, follow_symlinks=True):
862 """
863 Whether this path exists.
864
865 This method normally follows symlinks; to check whether a symlink exists,
866 add the argument follow_symlinks=False.
867 """
868 if follow_symlinks:
869 return os.path.exists(self)
870 return os.path.lexists(self)
871
872 def is_dir(self, *, follow_symlinks=True):
873 """

Callers 15

wasi_sdkFunction · 0.95
create_archiveFunction · 0.95
saveMethod · 0.95
test_pre_fork_compileMethod · 0.95
test_trampoline_worksMethod · 0.95
test_sys_apiMethod · 0.95
test_pre_fork_compileMethod · 0.95
mainFunction · 0.95

Calls 1

lexistsMethod · 0.45