Determine file-access permission.int _access( const char *path, int mode ); int _waccess( const wchar_t *path, int mode ); Parameters path File or directory path. mode Permission setting. Return Value Each function returns 0 if the file has the given mode. The function returns –1 if the named file does not exist or is not accessible in the given mode; in this case, errno is set as follows: EACCES Access denied: file's permission setting does not allow specified access. ENOENT Filename or path not found.
const char *path,
int mode
);
int _waccess(
const wchar_t *path,
int mode
);
Parameters
path
File or directory path.
mode
Permission setting.
Return Value
Each function returns 0 if the file has the given mode. The function returns –1 if the named file does not exist or is not accessible in the given mode; in this case, errno is set as follows: EACCES
Access denied: file's permission setting does not allow specified access.
ENOENT
Filename or path not found.