# The API of \`Path::exists()\` encourages broken code

**URL:** <https://internals.rust-lang.org/t/the-api-of-path-exists-encourages-broken-code/13817>\
**Category:** Uncategorized\
**Created:** [January 12, 2021, 12:16pm UTC](https://internals.rust-lang.org/t/the-api-of-path-exists-encourages-broken-code/13817 "2021-01-12T12:16:06Z")\
**Posts on this page:** 1\
**Showing post:** 25

<div class="post-metadata">

**Author:** ![josh](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/josh/32/5934_2.png) [@josh](https://internals.rust-lang.org/u/josh)\
**Post date:** [January 30, 2021, 7:01pm UTC](https://internals.rust-lang.org/t/the-api-of-path-exists-encourages-broken-code/13817/25 "2021-01-30T19:01:31Z")

</div>

Deprecation aside, I think this thread has made a compelling argument for a `try_exists` method. Anyone want to submit a PR for that method?

---

_[View the full topic](https://internals.rust-lang.org/t/the-api-of-path-exists-encourages-broken-code/13817)._
