MCPcopy Create free account
hub / github.com/NetHack/NetHack / access

Function access

outdated/sys/wince/celib.c:334–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

332}
333
334int __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
351int
352chdir(const char *dirname)

Callers 6

curses_init_nhwindowsFunction · 0.85
fopen_wizkit_fileFunction · 0.85
recover_savefileFunction · 0.85
reveal_pathsFunction · 0.85
fopen_config_fileFunction · 0.85
can_read_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected