106 {
107
109 {
110 string file_content;
111 string line_content;
112 string error;
113
115 if (handle == 0)
116 return;
117
118 while (
FGets(handle, line_content) >= 0)
119 {
120 file_content += line_content;
121 }
122
124
127
128 if (!
m_Serializer.ReadFromString(data, file_content, error))
129 ErrorEx(
string.Format(
"Cannot load data from \"%1\":\n%2", filename, error));
130 }
131 }
static ref JsonSerializer m_Serializer
proto void CloseFile(FileHandle file)
Close the File.
proto int FGets(FileHandle file, string var)
Get line from file, every next call of this function returns next line.
proto FileHandle OpenFile(string name, FileMode mode)
Opens File.
proto bool FileExist(string name)
Check existence of file.