2016-08-29 15:35:48 +02:00
|
|
|
#ifndef IOUTILITIES_PATHHELPER_H
|
|
|
|
#define IOUTILITIES_PATHHELPER_H
|
|
|
|
|
2017-01-14 00:33:02 +01:00
|
|
|
#include "../global.h"
|
2016-08-29 15:35:48 +02:00
|
|
|
|
|
|
|
#include <list>
|
2017-05-01 03:13:11 +02:00
|
|
|
#include <string>
|
2016-08-29 15:35:48 +02:00
|
|
|
|
|
|
|
#ifdef PLATFORM_WINDOWS
|
2017-05-01 03:13:11 +02:00
|
|
|
#define PATH_SEP_CHAR '\\'
|
|
|
|
#define SEARCH_PATH_SEP_CHAR ';'
|
|
|
|
#define PATH_SEP_STR "\\"
|
|
|
|
#define SEARCH_PATH_SEP_STR ";"
|
2016-08-29 15:35:48 +02:00
|
|
|
#else
|
2017-05-01 03:13:11 +02:00
|
|
|
#define PATH_SEP_CHAR '/'
|
|
|
|
#define SEARCH_PATH_SEP_CHAR ':'
|
|
|
|
#define PATH_SEP_STR "/"
|
|
|
|
#define SEARCH_PATH_SEP_STR ":"
|
2016-08-29 15:35:48 +02:00
|
|
|
#endif
|
|
|
|
|
2019-06-10 21:56:46 +02:00
|
|
|
namespace CppUtilities {
|
2016-08-29 15:35:48 +02:00
|
|
|
|
|
|
|
CPP_UTILITIES_EXPORT std::string fileName(const std::string &path);
|
|
|
|
CPP_UTILITIES_EXPORT std::string directory(const std::string &path);
|
|
|
|
CPP_UTILITIES_EXPORT void removeInvalidChars(std::string &fileName);
|
2019-06-10 21:56:46 +02:00
|
|
|
} // namespace CppUtilities
|
2016-08-29 15:35:48 +02:00
|
|
|
|
|
|
|
#endif // IOUTILITIES_PATHHELPER_H
|