This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Check to see if a file or directory can be accessed (extended version)
#include <libgen.h> #include <unistd.h> int eaccess( const char * path, int amode );
or a bitwise ORing of the following access permissions to be checked, as defined in the header <unistd.h>:
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The eaccess() function is an extended version of access(). It checks if the file or directory specified by path exists and if it can be accessed with the file access permissions given by amode. However, unlike access(), it uses the effective user ID and effective group ID.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
access(), chmod(), errno, fstat(), open(), stat()