#include <sys/stat.h>
bool IsPathExist(const std::string &s)
{
struct stat buffer;
return (stat (s.c_str(), &buffer) == 0);
}
#include <sys/stat.h>
int main() {
struct stat buffer;
std::string string = "Hello";
if (stat(&string.c_str(), &buffer) != 0) {
std::cout << "'Hello' directory doesn't exist!";
} else {
std::cout << "'Hello' directory exists!";
}
}