/////////////////////////////////////////////////////////////////////
| 599 | |
| 600 | ////////////////////////////////////////////////////////////////////////// |
| 601 | void CPanelTreeBrowser::LoadFiles( FilesInfo &info ) |
| 602 | { |
| 603 | CString fileSpec = m_fileSpec; |
| 604 | CString currFileSpec; |
| 605 | static CFileUtil::FileArray files; |
| 606 | |
| 607 | info.files.clear(); |
| 608 | |
| 609 | // Reserve many files. |
| 610 | files.resize(0); |
| 611 | files.reserve( 10000 ); |
| 612 | |
| 613 | // Split file spec with ';' |
| 614 | while (!fileSpec.IsEmpty()) |
| 615 | { |
| 616 | int splitpos = fileSpec.Find(';'); |
| 617 | if (splitpos < 0) |
| 618 | { |
| 619 | currFileSpec = fileSpec; |
| 620 | CFileUtil::ScanDirectory( m_path,currFileSpec,files,true ); |
| 621 | break; |
| 622 | } |
| 623 | CString currFileSpec = fileSpec.Mid(0,splitpos); |
| 624 | CFileUtil::ScanDirectory( m_path,currFileSpec,files,true ); |
| 625 | fileSpec = fileSpec.Mid(splitpos+1); |
| 626 | } |
| 627 | |
| 628 | info.files.reserve( files.size() ); |
| 629 | for (int i = 0; i < files.size(); i++) |
| 630 | { |
| 631 | info.files.push_back( files[i].filename ); |
| 632 | } |
| 633 | //std::sort( info.files.begin(),info.files.end() ); |
| 634 | |
| 635 | m_fileHistory[m_fileSpec] = info; |
| 636 | } |
| 637 | |
| 638 | ////////////////////////////////////////////////////////////////////////// |
| 639 | void CPanelTreeBrowser::FillFiles( FilesInfo &finfo ) |