MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / my_access

Function my_access

mysys/my_access.c:39–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37*/
38
39int my_access(const char *path, int amode)
40{
41 WIN32_FILE_ATTRIBUTE_DATA fileinfo;
42 BOOL result;
43
44 result= GetFileAttributesEx(path, GetFileExInfoStandard, &fileinfo);
45 if (! result ||
46 (fileinfo.dwFileAttributes & FILE_ATTRIBUTE_READONLY) && (amode & W_OK))
47 {
48 my_errno= errno= EACCES;
49 return -1;
50 }
51 return 0;
52}
53
54#endif /* __WIN__ */
55

Callers 2

check_log_pathFunction · 0.85
symdirgetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected