Sets the path of the current working directory. Returns true if this was successful. */
| 87 | |
| 88 | /** Sets the path of the current working directory. Returns true if this was successful. */ |
| 89 | bool Path_SetWorkingDirectory( const std::string & sPath ) |
| 90 | { |
| 91 | bool bSuccess; |
| 92 | #if defined( _WIN32 ) |
| 93 | std::wstring wsPath = UTF8to16( sPath.c_str() ); |
| 94 | bSuccess = 0 == _wchdir( wsPath.c_str() ); |
| 95 | #else |
| 96 | bSuccess = 0 == chdir( sPath.c_str() ); |
| 97 | #endif |
| 98 | return bSuccess; |
| 99 | } |
| 100 | |
| 101 | /** Returns the specified path without its filename */ |
| 102 | std::string Path_StripFilename( const std::string & sPath, char slash ) |
nothing calls this directly
no test coverage detected