Determines whether a file or directory exists and whether it can be accessed.
#include <unistd.h> int access ( const char *path, int mode);
(IN) Specifies the pathname of the file or directory to check for accessibility.
(IN) Specifies the access permission mode for the file with a bitwise-inclusive OR of the following flags:
If successful, returns 0, indicating that the file or directory exists and can be accessed with the specified mode. Otherwise, returns -1 and sets errno to one of the following: