MCPcopy Create free account
hub / github.com/BeneficialCode/WinArk / LoadFromFile

Method LoadFromFile

WinArk/LocationManager.cpp:64–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64bool LocationManager::LoadFromFile(PCWSTR path) {
65 path = GetPath(path);
66 if (!path)
67 return false;
68
69 IniFile file(path);
70 if (!file.IsValid())
71 return false;
72
73 auto data = file.ReadSection(L"Location");
74 for (auto& text : data) {
75 int n = text.Find(L'=');
76 _items.insert({ n < 0 ? text : text.Left(n),n < 0 ? text : text.Mid(n + 1) });
77 }
78
79 return true;
80}
81
82bool LocationManager::SaveToFile(PCWSTR path) const {
83 path = GetPath(path);

Callers

nothing calls this directly

Calls 3

ReadSectionMethod · 0.80
FindMethod · 0.80
IsValidMethod · 0.45

Tested by

no test coverage detected