| 315 | } |
| 316 | |
| 317 | void UITreeViewFS::copyFile( const std::string& src, const std::string& dst ) { |
| 318 | FileInfo srcInfo( src ); |
| 319 | if ( !srcInfo.exists() ) |
| 320 | return; |
| 321 | FileInfo dstInfo( dst ); |
| 322 | if ( !dstInfo.exists() ) |
| 323 | return; |
| 324 | if ( srcInfo.getFilepath() != srcInfo.getRealPath() ) |
| 325 | srcInfo = FileInfo( srcInfo.getRealPath() ); |
| 326 | if ( !dstInfo.isDirectory() ) { |
| 327 | dstInfo = FileInfo( dstInfo.getDirectoryPath() ); |
| 328 | if ( dstInfo.getFilepath() != dstInfo.getRealPath() ) |
| 329 | dstInfo = FileInfo( dstInfo.getRealPath() ); |
| 330 | } |
| 331 | if ( srcInfo.getDirectoryPath() == dstInfo.getFilepath() ) |
| 332 | return; |
| 333 | |
| 334 | std::string srcPath( srcInfo.getFilepath() ); |
| 335 | std::string dstPath( dstInfo.getFilepath() ); |
| 336 | FileSystem::dirAddSlashAtEnd( dstPath ); |
| 337 | dstPath += srcInfo.getFileName(); |
| 338 | FileSystem::fileCopy( srcPath, dstPath ); |
| 339 | } |
| 340 | |
| 341 | void UITreeViewFS::copyFiles( const std::vector<std::string>& paths, const std::string& dstDir ) { |
| 342 | for ( const auto& srcPath : paths ) { |
nothing calls this directly
no test coverage detected