Consider a situation in which a user wants to check existence of a file. However, the user doesn't have access to the directory that would contain the file. As a result, permission denied error happens internally but gets silently converted to
I don't believe that "false" is the right answer to "does this file exist?" if a program is not allowed to know.
I suggest to replace
try_exists, which returns
io::Result<bool> and deprecate
exists. I suspect an RFC is needed for this, right?
I guess that some people might have meant
accessible when writing
exists, so perhaps add
accessible method that internally calls
access on Unixes (IDK if there's something similar on Windows). However there's an interesting difference between UID and EUID, which should be documented.