| 76 | } |
| 77 | |
| 78 | std::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 | |
| 100 | std::string FileSystem::precomposeFileName( const std::string& name ) { |
| 101 | #if EFSW_OS == EFSW_OS_MACOSX |