函数原型如下
int access(const char *pathname,int mode)
#define F_OK 0 /* Check for file existence */
#define X_OK 1 /* MS access() doesn't check for execute permission. */
#define W_OK 2 /* Check for write permission */
#define R_OK 4 /* Check for read permission */
此函数主要检测文件是否有读写执行权限或文件是否存在,具体检测哪方面需要根据mode来进行选择