mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
New SystemToolkit to manage access to files and settings folders in an
OS dependent way
This commit is contained in:
25
SystemToolkit.h
Normal file
25
SystemToolkit.h
Normal 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
|
||||
Reference in New Issue
Block a user