MCPcopy Create free account
hub / github.com/ValveSoftware/openvr / Path_GetWorkingDirectory

Function Path_GetWorkingDirectory

src/vrcore/pathtools_public.cpp:98–109  ·  view source on GitHub ↗

Returns the path of the current working directory */

Source from the content-addressed store, hash-verified

96
97/** Returns the path of the current working directory */
98std::string Path_GetWorkingDirectory()
99{
100 std::string sPath;
101#if defined( _WIN32 )
102 wchar_t buf[MAX_UNICODE_PATH];
103 sPath = UTF16to8( _wgetcwd( buf, MAX_UNICODE_PATH ) );
104#else
105 char buf[ 1024 ];
106 sPath = getcwd( buf, sizeof( buf ) );
107#endif
108 return sPath;
109}
110
111/** Sets the path of the current working directory. Returns true if this was successful. */
112bool Path_SetWorkingDirectory( const std::string & sPath )

Callers 1

Calls 1

UTF16to8Function · 0.70

Tested by

no test coverage detected