49 std::FILE *fp = std::fopen(filename,
"rb");
53 std::fseek(fp, 0, SEEK_END);
54 contents.resize(std::ftell(fp));
58 if(!std::fread(&contents[0], 1, contents.size(), fp))
76 found = str.find_last_of(
"/\\");
79 return str.substr(0, found);
std::string GetFilePath(const std::string &str)
Gets file path from filename.
std::string GetFileContents(const char *filename)
Read contents from a file.