#pragma once
#include <string>
#include <vector>
#include <stdint.h>
std::string Path_GetExecutablePath();
std::string Path_GetExecutableName();
std::string Path_GetWorkingDirectory();
bool Path_SetWorkingDirectory( const std::string & sPath );
std::string Path_GetTemporaryDirectory();
std::string Path_GetThisModulePath();
std::string Path_StripFilename( const std::string & sPath, char slash = 0 );
std::string Path_StripDirectory( const std::string & sPath, char slash = 0 );
std::string Path_StripExtension( const std::string & sPath );
std::string Path_GetExtension( const std::string & sPath );
bool Path_IsAbsolute( const std::string & sPath );
std::string Path_MakeAbsolute( const std::string & sRelativePath, const std::string & sBasePath );
std::string Path_FixSlashes( const std::string & sPath, char slash = 0 );
char Path_GetSlash();
std::string Path_Join( const std::string & first, const std::string & second, char slash = 0 );
std::string Path_Join( const std::string & first, const std::string & second, const std::string & third, char slash = 0 );
std::string Path_Join( const std::string & first, const std::string & second, const std::string & third, const std::string &fourth, char slash = 0 );
std::string Path_Join(
const std::string & first,
const std::string & second,
const std::string & third,
const std::string & fourth,
const std::string & fifth,
char slash = 0 );
std::string Path_Compact( const std::string & sRawPath, char slash = 0 );
bool Path_IsSamePath( const std::string & sPath1, const std::string & sPath2 );
std::string Path_RemoveTrailingSlash( const std::string & sRawPath, char slash = 0 );
bool Path_IsDirectory( const std::string & sPath );
bool Path_IsAppBundle( const std::string & sPath );
bool Path_Exists( const std::string & sPath );
std::string Path_FindParentDirectoryRecursively( const std::string &strStartDirectory, const std::string &strDirectoryName );
std::string Path_FindParentSubDirectoryRecursively( const std::string &strStartDirectory, const std::string &strDirectoryName );
bool Path_MakeWritable( const std::string &strFilename );
unsigned char * Path_ReadBinaryFile( const std::string &strFilename, int *pSize );
uint32_t Path_ReadBinaryFile( const std::string &strFilename, unsigned char *pBuffer, uint32_t unSize );
std::vector<uint8_t> Path_ReadBinaryFile( const std::string & strFilename );
bool Path_WriteBinaryFile( const std::string &strFilename, unsigned char *pData, unsigned nSize );
std::string Path_ReadTextFile( const std::string &strFilename );
bool Path_WriteStringToTextFile( const std::string &strFilename, const char *pchData );
bool Path_WriteStringToTextFileAtomic( const std::string &strFilename, const char *pchData );
std::string Path_FilePathToUrl( const std::string & sRelativePath, const std::string & sBasePath );
std::string Path_UrlToFilePath( const std::string & sFileUrl );
std::string GetUserDocumentsPath();
bool Path_UnlinkFile( const std::string &strFilename );
std::string Path_SanitizeFilename( const std::string& sFilename );
bool Path_DeleteDirectory( const std::string& sDirectoryPath, bool bDeleteSubdirectories = false );
#ifndef MAX_UNICODE_PATH
#define MAX_UNICODE_PATH 32767
#endif
#ifndef MAX_UNICODE_PATH_IN_UTF8
#define MAX_UNICODE_PATH_IN_UTF8 (MAX_UNICODE_PATH * 4)
#endif
#if defined(WIN32)
#define DYNAMIC_LIB_EXT ".dll"
#define PROGRAM_EXT ".exe"
#ifdef _WIN64
#define PLATSUBDIR "win64"
#else
#define PLATSUBDIR "win32"
#endif
#elif defined(OSX)
#define DYNAMIC_LIB_EXT ".dylib"
#define PLATSUBDIR "osx32"
#define PROGRAM_EXT ""
#elif defined(LINUX)
#define DYNAMIC_LIB_EXT ".so"
#define PROGRAM_EXT ""
#if defined( LINUX32 )
#define PLATSUBDIR "linux32"
#elif defined( ANDROIDARM32 )
#define PLATSUBDIR "androidarm32"
#elif defined( ANDROIDARM64 )
#define PLATSUBDIR "androidarm64"
#elif defined( LINUXARM64 )
#define PLATSUBDIR "linuxarm64"
#else
#define PLATSUBDIR "linux64"
#endif
#else
#warning "Unknown platform for PLATSUBDIR"
#define PLATSUBDIR "unknown_platform"
#endif