MCPcopy Create free account
hub / github.com/PenguLoader/PenguLoader / Config

Method Config

loader/Main/Config.cs:16–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14 static Dictionary<string, string> _data;
15
16 static Config()
17 {
18 Utils.EnsureDirectoryExists(PluginsDir);
19 Utils.EnsureFileExists(ConfigPath);
20 Utils.EnsureFileExists(DataStorePath);
21
22 _data = new Dictionary<string, string>();
23
24 if (File.Exists(ConfigPath))
25 {
26 var lines = File.ReadAllLines(ConfigPath);
27
28 foreach (string line in lines)
29 {
30 var parts = line.Split(new[] { '=' }, 2);
31
32 if (parts.Length == 2)
33 {
34 string key = parts[0].Trim();
35 string value = parts[1].Trim();
36
37 _data[key] = value;
38 }
39 }
40 }
41 }
42
43 static void Save()
44 {

Callers

nothing calls this directly

Calls 2

EnsureDirectoryExistsMethod · 0.80
EnsureFileExistsMethod · 0.80

Tested by

no test coverage detected