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

Function file_exists

sys/unix/unixunix.c:465–478  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

463/* XXX should be ifdef PANICTRACE_GDB, but there's no such symbol yet */
464#ifdef PANICTRACE
465boolean
466file_exists(const char *path)
467{
468 struct stat sb;
469
470 /* Just see if it's there - trying to figure out if we can actually
471 * execute it in all cases is too hard - we really just want to
472 * catch typos in SYSCF.
473 */
474 if (stat(path, &sb)) {
475 return FALSE;
476 }
477 return TRUE;
478}
479#endif
480
481/*unixunix.c*/

Callers 3

get_saved_gamesFunction · 0.50
cnf_line_GDBPATHFunction · 0.50
cnf_line_GREPPATHFunction · 0.50

Calls 1

statClass · 0.70

Tested by

no test coverage detected