|
|
@ -439,7 +439,22 @@ void plFileUtils::AddSlash(char* path) |
|
|
|
{ |
|
|
|
{ |
|
|
|
char lastChar = path[strlen(path)-1]; |
|
|
|
char lastChar = path[strlen(path)-1]; |
|
|
|
if (lastChar != '\\' && lastChar != '/') |
|
|
|
if (lastChar != '\\' && lastChar != '/') |
|
|
|
|
|
|
|
#if HS_BUILD_FOR_WIN32 |
|
|
|
strcat(path, "\\"); |
|
|
|
strcat(path, "\\"); |
|
|
|
|
|
|
|
#else |
|
|
|
|
|
|
|
strcat(path, "/"); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void plFileUtils::AddSlash(wchar* path) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
wchar lastChar = path[wcslen(path)-1]; |
|
|
|
|
|
|
|
if (lastChar != L'\\' && lastChar != L'/') |
|
|
|
|
|
|
|
#if HS_BUILD_FOR_WIN32 |
|
|
|
|
|
|
|
wcscat(path, L"\\"); |
|
|
|
|
|
|
|
#else |
|
|
|
|
|
|
|
wcscat(path, L"/"); |
|
|
|
|
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void plFileUtils::ConcatFileName(char* path, const char* fileName) |
|
|
|
void plFileUtils::ConcatFileName(char* path, const char* fileName) |
|
|
@ -448,6 +463,12 @@ void plFileUtils::ConcatFileName(char* path, const char* fileName) |
|
|
|
strcat(path, fileName); |
|
|
|
strcat(path, fileName); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void plFileUtils::ConcatFileName(wchar* path, const wchar* fileName) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
AddSlash(path); |
|
|
|
|
|
|
|
wcscat(path, fileName); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//// GetFileSize /////////////////////////////////////////////////////////////
|
|
|
|
//// GetFileSize /////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
UInt32 plFileUtils::GetFileSize( const char *path ) |
|
|
|
UInt32 plFileUtils::GetFileSize( const char *path ) |
|
|
|