Play-/tools/McServTest/AppConfig.cpp

28 lines
564 B
C++
Raw Permalink Normal View History

2014-11-15 23:22:29 -05:00
#include "AppConfig.h"
#include "PathUtils.h"
2019-10-17 21:06:53 -04:00
#define BASE_DATA_PATH ("McServTest Data Files")
#define CONFIG_FILENAME ("config.xml")
2014-11-15 23:22:29 -05:00
CAppConfig::CAppConfig()
2018-04-30 21:01:23 +01:00
: CConfig(BuildConfigPath())
2014-11-15 23:22:29 -05:00
{
}
CAppConfig::~CAppConfig()
{
}
Framework::CConfig::PathType CAppConfig::GetBasePath()
{
auto result = Framework::PathUtils::GetPersonalDataPath() / BASE_DATA_PATH;
return result;
}
Framework::CConfig::PathType CAppConfig::BuildConfigPath()
{
auto userPath(GetBasePath());
Framework::PathUtils::EnsurePathExists(userPath);
return userPath / CONFIG_FILENAME;
}