2015-04-22 18:36:40 +02:00
|
|
|
#ifndef PATHHELPER_H
|
|
|
|
#define PATHHELPER_H
|
|
|
|
|
2015-09-06 20:19:09 +02:00
|
|
|
#include "./binarywriter.h"
|
|
|
|
#include "./binaryreader.h"
|
2015-04-22 18:36:40 +02:00
|
|
|
|
2015-09-06 20:19:09 +02:00
|
|
|
#include "../application/global.h"
|
2015-04-22 18:36:40 +02:00
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
2016-04-16 00:50:16 +02:00
|
|
|
#ifdef PLATFORM_WINDOWS
|
|
|
|
# define PATH_SEP_CHAR '\\'
|
|
|
|
# define SEARCH_PATH_SEP_CHAR ';'
|
|
|
|
# define PATH_SEP_STR "\\"
|
|
|
|
# define SEARCH_PATH_SEP_STR ";"
|
|
|
|
#else
|
|
|
|
# define PATH_SEP_CHAR '/'
|
|
|
|
# define SEARCH_PATH_SEP_CHAR ':'
|
|
|
|
# define PATH_SEP_STR "/"
|
|
|
|
# define SEARCH_PATH_SEP_STR ":"
|
|
|
|
#endif
|
|
|
|
|
2015-09-06 15:30:16 +02:00
|
|
|
namespace IoUtilities {
|
2015-04-22 18:36:40 +02:00
|
|
|
|
|
|
|
LIB_EXPORT std::string fileName(const std::string &path);
|
2016-01-27 02:17:06 +01:00
|
|
|
LIB_EXPORT void removeInvalidChars(std::string &fileName);
|
2015-04-22 18:36:40 +02:00
|
|
|
LIB_EXPORT bool settingsDirectory(std::string &result, std::string applicationDirectoryName = std::string(), bool createApplicationDirectory = false);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // PATHHELPER_H
|