netcse
12/28/2015 - 7:49 AM

GNU C

GNU C

Check whether a directory exists

#include <sys/stat.h>
struct stat st;
if(stat("/tmp",&st) == 0)
        printf(" /tmp is present\n");