#include "../include/FileUtils.h" #include #include #include bool FileUtils::fileExists(char *path){ struct stat s; // Check if file exists, and if it isn't a folder. if (stat(path, &s) == 0 && !(s.st_mode & S_IFDIR)){ return true; } return false; } string FileUtils::getFile(char *path){ ifstream file(path); string line; // There is only one line in the file getline(file, line); file.close(); return line; }