MCPcopy Index your code
hub / github.com/RustPython/RustPython / exists

Method exists

Lib/pathlib/__init__.py:663–672  ·  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

661 return os.lstat(self)
662
663 def exists(self, *, follow_symlinks=True):
664 """
665 Whether this path exists.
666
667 This method normally follows symlinks; to check whether a symlink exists,
668 add the argument follow_symlinks=False.
669 """
670 if follow_symlinks:
671 return os.path.exists(self)
672 return os.path.lexists(self)
673
674 def is_dir(self, *, follow_symlinks=True):
675 """

Calls 1

lexistsMethod · 0.45