8 {
10 {
12 if (handle == 0)
13 {
14 errorMessage = string.Format("Cannot open file \"%1\" for reading", filename);
15 return false;
16 }
17
18 string fileContent;
20
22
25
26 string error;
27 if (!
m_Serializer.ReadFromString(data, fileContent, error))
28 {
29 errorMessage = string.Format("Cannot load data from \"%1\":\n%2", filename, error);
30 return false;
31 }
32
33 return true;
34 }
35 else
36 {
37 errorMessage = string.Format("File \"%1\" does not exist, check the provided path", filename, error);
38 return false;
39 }
40 }
static ref JsonSerializer m_Serializer
static const int READ_FILE_LENGTH
proto void CloseFile(FileHandle file)
Close the File.
proto int ReadFile(FileHandle file, void param_array, int length)
proto FileHandle OpenFile(string name, FileMode mode)
Opens File.
proto bool FileExist(string name)
Check existence of file.