| 37 | */ |
| 38 | |
| 39 | int 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 |
no outgoing calls
no test coverage detected