New SystemToolkit to manage access to files and settings folders in an

OS dependent way
This commit is contained in:
brunoherbelin
2020-04-29 19:58:49 +02:00
parent 7aaaa37e4b
commit c18cd1bcc6
5 changed files with 133 additions and 4 deletions

25
SystemToolkit.h Normal file
View File

@@ -0,0 +1,25 @@
#ifndef SYSTEMTOOLKIT_H
#define SYSTEMTOOLKIT_H
#ifdef WIN32
#define PATH_SEP '\\'
#elif defined(LINUX) or defined(APPLE)
#define PATH_SEP '/'
#endif
#include <string>
#include <list>
namespace SystemToolkit
{
// get the OS dependent path where to store settings
std::string settingsPath();
// builds the OS dependent complete file name for a settings file
std::string settingsFileCompletePath(std::string basefilename);
bool fileExists(const std::string& path);
bool createDirectory(const std::string& path);
}
#endif // SYSTEMTOOLKIT_H