MCPcopy Create free account
hub / github.com/BobbyAnguelov/FbxFormatConverter / GetFullPathString

Function GetFullPathString

main.cpp:35–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33namespace FileSystemHelpers
34{
35 static std::string GetFullPathString( char const* pPath )
36 {
37 assert( pPath != nullptr && pPath[0] != 0 );
38
39 char fullpath[256] = { 0 };
40 DWORD length = GetFullPathNameA( pPath, 256, fullpath, nullptr );
41 assert( length != 0 && length != 255 );
42
43 // We always append the trailing slash to simplify further operations
44 DWORD const result = GetFileAttributesA( fullpath );
45 if ( result != INVALID_FILE_ATTRIBUTES && ( result & FILE_ATTRIBUTE_DIRECTORY ) && fullpath[length - 1] != '\\' )
46 {
47 fullpath[length] = '\\';
48 fullpath[length + 1] = 0;
49 }
50
51 return std::string( fullpath );
52 }
53
54 static std::string GetFullPathString( std::string const& path )
55 {

Callers 2

GetDirectoryContentsFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected