#include "File.h" #include #include #include File::File(string path) { this->path = path; } File::File(const File& orig) { } File::~File() { } bool File::exists() { ifstream fileStream(path); return fileStream.good(); } string File::read() { ifstream fileStream(path); if(!fileStream.good()) { return ""; } stringstream stream; string s; while(!fileStream.eof()) { getline(fileStream, s); stream << s; stream << '\n'; } return stream.str(); }