#include <sys/stat.h> bool IsPathExist(const std::string &s) { struct stat buffer; return (stat (s.c_str(), &buffer) == 0); }