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

Method pathRemoveFileName

src/efsw/FileSystem.cpp:66–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66std::string FileSystem::pathRemoveFileName( std::string filepath ) {
67 dirRemoveSlashAtEnd( filepath );
68
69 size_t pos = filepath.find_last_of( getOSSlash() );
70
71 if ( pos != std::string::npos ) {
72 return filepath.substr( 0, pos + 1 );
73 }
74
75 return filepath;
76}
77
78std::string FileSystem::getLinkRealPath( std::string dir, std::string& curPath ) {
79 FileSystem::dirRemoveSlashAtEnd( dir );

Callers

nothing calls this directly

Calls 2

find_last_ofMethod · 0.80
substrMethod · 0.80

Tested by

no test coverage detected