On my system, man -2 stat enumerates
- EACCES
- Search permission is denied for one of the directories in the path prefix of path. (See also path_resolution(2).)
- EBADF
- filedes is bad.
- EFAULT
- Bad address.
- ELOOP
- Too many symbolic links encountered while traversing the path.
- ENAMETOOLONG
- File name too long.
- ENOENT
- A component of the path path does not exist, or the path is an empty string.
- ENOMEM
- Out of memory (i.e. kernel memory).
- ENOTDIR
- A component of the path is not a directory.
And I don't see anything there for read failures (incl communication failures with remote volumes).
perl -MErrno=ENOENT -le'
$found = -e shift;
die("stat: $!\n") if !defined($found) && $! != ENOENT;
print($found ? "found" : "not found");
' file