| 332 | } |
| 333 | |
| 334 | int __cdecl access(const char *path, int mode) |
| 335 | { |
| 336 | DWORD attr; |
| 337 | WCHAR f[MAX_PATH + 1]; |
| 338 | ZeroMemory(f, sizeof(f)); |
| 339 | MultiByteToWideChar(CP_ACP, 0, path, -1, f, MAX_PATH); |
| 340 | |
| 341 | attr = GetFileAttributes(f); |
| 342 | if (attr == (DWORD) -1) |
| 343 | return -1; |
| 344 | |
| 345 | if ((attr & FILE_ATTRIBUTE_READONLY) && (mode & 2)) |
| 346 | return -1; |
| 347 | else |
| 348 | return 0; |
| 349 | } |
| 350 | |
| 351 | int |
| 352 | chdir(const char *dirname) |
no outgoing calls
no test coverage detected