| 147 | } |
| 148 | |
| 149 | std::string FileSystem::getRealPath( const std::string& path ) { |
| 150 | std::string realPath; |
| 151 | #if defined( EFSW_PLATFORM_POSIX ) |
| 152 | char dir[PATH_MAX]; |
| 153 | realpath( path.c_str(), &dir[0] ); |
| 154 | realPath = std::string( dir ); |
| 155 | #elif EFSW_OS == EFSW_OS_WIN |
| 156 | wchar_t dir[_MAX_PATH + 1]; |
| 157 | GetFullPathNameW( getWidePath( path ).c_str(), _MAX_PATH, &dir[0], nullptr ); |
| 158 | realPath = String( dir ).toUtf8(); |
| 159 | #else |
| 160 | #warning FileSystem::getRealPath() not implemented on this platform. |
| 161 | #endif |
| 162 | return realPath; |
| 163 | } |
| 164 | |
| 165 | #if EFSW_PLATFORM == EFSW_PLATFORM_WIN32 |
| 166 | std::wstring FileSystem::getWidePath(const std::string & path) { |