I have successfully used both stat()
& access()
separately to determine if a user has either read or read/write access to a directory.
In the simple case, both are functionally equivalent for our matter. Also, access()
would not be much faster or so as the same data structure (the inode) much be fetched.
However, if access control lists (ACL) are used on the system, access will process these while you have no way to check ACLs with the stat
data.