Function try_exists
pub async fn try_exists(path: impl AsRef<Path>) -> Result<bool>
Available on crate feature
fs only.Returns Ok(true) if the path points at an existing entity.
This function will traverse symbolic links to query information about the destination file. In case of broken symbolic links this will return Ok(false).
This is the async equivalent of std::path::Path::try_exists.
Examples
use tokio::fs;
fs::try_exists("foo.txt").await?;
MIT License
Copyright © Tokio Contributors
https://docs.rs/tokio/1.53.1/tokio/fs/fn.try_exists.html