#include <anna/core/util/Tokenizer.hpp>
#include <algorithm>
+#include <fstream>
+#include <sstream>
using namespace anna;
return ret;
}
+bool functions::getContentFromFile(const std::string &pathfile, std::string &content) throw(anna::RuntimeException) {
+
+ std::ifstream inFile(pathfile.c_str(), std::ifstream::in);
+ if(!inFile.good()) {
+ throw RuntimeException(anna::functions::asString("Unable to open file '%s'", pathfile.c_str()), ANNA_FILE_LOCATION);
+ }
+
+ std::stringstream strStream;
+ strStream << inFile.rdbuf(); //read the file
+ content = strStream.str(); // holds the content of the file
+ inFile.close();
+
+ return true;
+}
+