59 void saveTimers(
const std::vector < TimerData>& times);
77 if (SUCCEEDED(SHGetFolderPathA(NULL, CSIDL_APPDATA, NULL, 0, path))) {
78 return std::string(path) +
"\\timer-console\\";
81 const char* homeDir = getenv(
"HOME");
85 return std::string(homeDir) +
"/.timer-console/";
void saveTimers(const std::vector< TimerData > ×)
Definition files.cpp:177
std::string getAppDataPath()
getAppDataPath returns the string that represents the file path which locates the configuration direc...
Definition files.h:74
Files()
Files constructor takes in no parameters and executes no initializing logic.
Definition files.cpp:39
std::vector< TimerData > getTimers()
getTimers takes in no parameters. This method is made to fetch timers stored from a configuration fil...
Definition files.cpp:117
std::vector< AlarmData > getAlarms()
getAlarms takes in no parameters. This method is made to fetch alarms from a configuration file which...
Definition files.cpp:42
void saveJsonToFile(const std::string &fileName, json j)
saveJsonToFile does as it says. It takes any json shape and saves it to a file found or created at th...
Definition files.cpp:236
nlohmann::json deserializeJson(std::ifstream &inFile)
deserializeJson returns a valid JSON object
Definition files.cpp:208
nlohmann::json json
For better readability and development process using json is declared here at the top of the implemen...
Definition files.cpp:37