123456789101112
#include <sys/types.h> #Include <sys/stat.h> #include <unistd.h> bool CheckPath( const char* userPath ) { struct stat statBuf; if( stat( userPath, &statBuf ) < 0 ) return false; return S_ISDIR( statBuf.st_mode ); }