src/sgp/FileMan.cc
/** Read the whole file as text. */
Read the whole file as text.
Read the whole file as text .
std::string FileMan::fileReadText(SGPFile* file)
{
	uint32_t size = FileGetSize(file);
	char *data = new char[size+1];
	FileRead(file, data, size);
	data[size] = 0;
	std::string result(data);
	delete[] data;
	return result;
}
std :: string FileMan :: fileReadText ( SGPFile * file ) { uint32_t size = FileGetSize ( file ) ; char * data = new char [ size + 1 ] ; FileRead ( file , data , size ) ; data [ size ] = 0 ; std :: string result ( data ) ; delete [ ] data ; return result ; }
Read the whole file as text.
Read the whole file as text .