All pastes #30479 Raw Edit

imnes

public c v1 · immutable
#30479 ·published 2005-11-23 03:39 UTC
rendered paste body
int isDir(char *pathName) {     #ifdef DEBUG     printf("isDir(%s)\n", pathName); fflush(NULL);     #endif     struct stat s;     if(stat(pathName, &s) == -1) {          printf("Cannot stat %s\n", pathName);          return FALSE;  // not fatal     }     if(s.st_mode == S_IFDIR)          return TRUE;     else          return FALSE;}