From ad71724cb2efaef8dc4dae844bf50b30c8c1d584 Mon Sep 17 00:00:00 2001 From: "Tristan B. Kildaire" Date: Sat, 26 Sep 2020 22:53:29 +0200 Subject: [PATCH] Added file read for config file --- source/app.d | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/app.d b/source/app.d index c3ea442..be32e96 100644 --- a/source/app.d +++ b/source/app.d @@ -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); } \ No newline at end of file