1#ifndef IOUTILITIES_PATHHELPER_H
2#define IOUTILITIES_PATHHELPER_H
7#include "../conversion/stringconversion.h"
14#ifdef PLATFORM_WINDOWS
15#define PATH_SEP_CHAR '\\'
16#define SEARCH_PATH_SEP_CHAR ';'
17#define PATH_SEP_STR "\\"
18#define SEARCH_PATH_SEP_STR ";"
20#define PATH_SEP_CHAR '/'
21#define SEARCH_PATH_SEP_CHAR ':'
22#define PATH_SEP_STR "/"
23#define SEARCH_PATH_SEP_STR ":"
30#ifdef CPP_UTILITIES_PATHHELPER_STRING_VIEW
48#ifdef PLATFORM_WINDOWS
55#ifdef PLATFORM_WINDOWS
56 auto ec = std::error_code();
57 return convertMultiByteToWide(ec, path);
#define CPP_UTILITIES_EXPORT
Marks the symbol to be exported by the c++utilities library.
Contains all utilities provides by the c++utilities library.
std::string_view makeNativePath(std::string_view path)
Returns path in the platform's native encoding.
CPP_UTILITIES_EXPORT void removeInvalidChars(std::string &fileName)
Removes invalid characters from the specified fileName.
CPP_UTILITIES_EXPORT std::string fileName(const std::string &path)
Returns the file name and extension of the specified path string.
CPP_UTILITIES_EXPORT std::string directory(const std::string &path)
Returns the directory of the specified path string (including trailing slash).