49 bool _fileExists(
string fileName)
52 return (stat(fileName.c_str(), &buffer) == 0);
55 bool _folderExists(
string folderName)
58 if (stat(folderName.c_str(), &buffer) == 0)
60 if (buffer.st_mode & __S_IFDIR != 0)
68 vector<string> *getdir (
string dir)
72 vector<string> *files=
new vector<string>();
73 if((dp = opendir(dir.c_str())) == NULL) {
77 while ((dirp = readdir(dp)) != NULL) {
78 files->push_back(
string(dirp->d_name));