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

Method getLinkRealPath

src/efsw/FileSystem.cpp:78–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78std::string FileSystem::getLinkRealPath( std::string dir, std::string& curPath ) {
79 FileSystem::dirRemoveSlashAtEnd( dir );
80 FileInfo fi( dir, true );
81
82 /// Check with lstat and see if it's a link
83 if ( fi.isLink() ) {
84 /// get the real path of the link
85 std::string link( fi.linksTo() );
86
87 /// get the current path of the directory without the link dir path
88 curPath = FileSystem::pathRemoveFileName( dir );
89
90 /// ensure that ends with the os directory slash
91 FileSystem::dirAddSlashAtEnd( link );
92
93 return link;
94 }
95
96 /// if it's not a link return nothing
97 return "";
98}
99
100std::string FileSystem::precomposeFileName( const std::string& name ) {
101#if EFSW_OS == EFSW_OS_MACOSX

Callers

nothing calls this directly

Calls 2

isLinkMethod · 0.80
linksToMethod · 0.80

Tested by

no test coverage detected