Added file read for config file

This commit is contained in:
Tristan B. Kildaire 2020-09-26 22:53:29 +02:00
parent 0282883427
commit ad71724cb2
1 changed files with 8 additions and 0 deletions

View File

@ -172,6 +172,8 @@ void defaultConfig()
JSONValue dserv;
dserv["address"] = "127.0.0.1";
dserv["port"] = "7777";
// JSONValue[] joins = []
// dserv["joins"] =
serverBlock["dserv"] = dserv;
config["servers"] = serverBlock;
@ -180,4 +182,10 @@ void defaultConfig()
void loadConfig(string configPath)
{
/* TODO: Implement me */
File file;
file.open(configPath);
byte[] buffer;
buffer.length = file.size();
buffer = file.rawRead(buffer);
}