aboutsummaryrefslogtreecommitdiff
path: root/source/Irrlicht/CFileSystem.cpp
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2021-08-30 20:44:51 +0200
committersfan5 <sfan5@live.de>2021-08-30 20:55:06 +0200
commit75b4c05741e4cb42a0705341b2b696aa0e9a73c0 (patch)
treec309e5aa6e3c5ef940745e53d9c7b13b4d389912 /source/Irrlicht/CFileSystem.cpp
parent2dc2846c3f8ec461c95e3b5e4f8e672f08eb31b5 (diff)
downloadirrlicht-75b4c05741e4cb42a0705341b2b696aa0e9a73c0.tar.xz
Drop _IRR_WCHAR_FILESYSTEM
never used and never worked for us.
Diffstat (limited to 'source/Irrlicht/CFileSystem.cpp')
-rw-r--r--source/Irrlicht/CFileSystem.cpp44
1 files changed, 0 insertions, 44 deletions
diff --git a/source/Irrlicht/CFileSystem.cpp b/source/Irrlicht/CFileSystem.cpp
index 7ba441f..5a9e1f4 100644
--- a/source/Irrlicht/CFileSystem.cpp
+++ b/source/Irrlicht/CFileSystem.cpp
@@ -515,15 +515,9 @@ const io::path& CFileSystem::getWorkingDirectory()
{
#if defined(_IRR_WINDOWS_API_)
fschar_t tmp[_MAX_PATH];
- #if defined(_IRR_WCHAR_FILESYSTEM )
- _wgetcwd(tmp, _MAX_PATH);
- WorkingDirectory[FILESYSTEM_NATIVE] = tmp;
- WorkingDirectory[FILESYSTEM_NATIVE].replace(L'\\', L'/');
- #else
_getcwd(tmp, _MAX_PATH);
WorkingDirectory[FILESYSTEM_NATIVE] = tmp;
WorkingDirectory[FILESYSTEM_NATIVE].replace('\\', '/');
- #endif
#endif
#if (defined(_IRR_POSIX_API_) || defined(_IRR_OSX_PLATFORM_))
@@ -532,21 +526,6 @@ const io::path& CFileSystem::getWorkingDirectory()
// so try it until the call was successful
// Note that neither the first nor the second parameter may be 0 according to POSIX
- #if defined(_IRR_WCHAR_FILESYSTEM )
- u32 pathSize=256;
- wchar_t *tmpPath = new wchar_t[pathSize];
- while ((pathSize < (1<<16)) && !(wgetcwd(tmpPath,pathSize)))
- {
- delete [] tmpPath;
- pathSize *= 2;
- tmpPath = new char[pathSize];
- }
- if (tmpPath)
- {
- WorkingDirectory[FILESYSTEM_NATIVE] = tmpPath;
- delete [] tmpPath;
- }
- #else
u32 pathSize=256;
char *tmpPath = new char[pathSize];
while ((pathSize < (1<<16)) && !(getcwd(tmpPath,pathSize)))
@@ -560,7 +539,6 @@ const io::path& CFileSystem::getWorkingDirectory()
WorkingDirectory[FILESYSTEM_NATIVE] = tmpPath;
delete [] tmpPath;
}
- #endif
#endif
WorkingDirectory[type].validate();
@@ -587,17 +565,9 @@ bool CFileSystem::changeWorkingDirectoryTo(const io::path& newDirectory)
WorkingDirectory[FILESYSTEM_NATIVE] = newDirectory;
#if defined(_MSC_VER)
- #if defined(_IRR_WCHAR_FILESYSTEM)
- success = (_wchdir(newDirectory.c_str()) == 0);
- #else
success = (_chdir(newDirectory.c_str()) == 0);
- #endif
#else
- #if defined(_IRR_WCHAR_FILESYSTEM)
- success = (_wchdir(newDirectory.c_str()) == 0);
- #else
success = (chdir(newDirectory.c_str()) == 0);
- #endif
#endif
}
@@ -612,15 +582,9 @@ io::path CFileSystem::getAbsolutePath(const io::path& filename) const
#if defined(_IRR_WINDOWS_API_)
fschar_t *p=0;
fschar_t fpath[_MAX_PATH];
- #if defined(_IRR_WCHAR_FILESYSTEM )
- p = _wfullpath(fpath, filename.c_str(), _MAX_PATH);
- core::stringw tmp(p);
- tmp.replace(L'\\', L'/');
- #else
p = _fullpath(fpath, filename.c_str(), _MAX_PATH);
core::stringc tmp(p);
tmp.replace('\\', '/');
- #endif
return tmp;
#elif (defined(_IRR_POSIX_API_) || defined(_IRR_OSX_PLATFORM_))
c8* p=0;
@@ -958,17 +922,9 @@ bool CFileSystem::existFile(const io::path& filename) const
return true;
#if defined(_MSC_VER)
- #if defined(_IRR_WCHAR_FILESYSTEM)
- return (_waccess(filename.c_str(), 0) != -1);
- #else
return (_access(filename.c_str(), 0) != -1);
- #endif
#elif defined(F_OK)
- #if defined(_IRR_WCHAR_FILESYSTEM)
- return (_waccess(filename.c_str(), F_OK) != -1);
- #else
return (access(filename.c_str(), F_OK) != -1);
- #endif
#else
return (access(filename.c_str(), 0) != -1);
#endif