MCPcopy Create free account
hub / github.com/SpartanJ/efsw / getRealPath

Method getRealPath

src/efsw/FileSystem.cpp:149–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149std::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
166std::wstring FileSystem::getWidePath(const std::string & path) {

Callers

nothing calls this directly

Calls 3

StringClass · 0.85
c_strMethod · 0.80
toUtf8Method · 0.80

Tested by

no test coverage detected