| 222 | } |
| 223 | |
| 224 | void ProjectDirectoryTree::asyncMatchTree( MatchType type, const std::string& match, |
| 225 | const size_t& max, MatchResultCb res, |
| 226 | const std::string& basePath ) const { |
| 227 | mPool->run( [this, match, max, res, basePath, type]() { |
| 228 | std::shared_ptr<FileListModel> result; |
| 229 | switch ( type ) { |
| 230 | case MatchType::Substring: |
| 231 | result = matchTree( match, max, basePath ); |
| 232 | break; |
| 233 | case MatchType::Fuzzy: |
| 234 | result = fuzzyMatchTree( match, max, basePath ); |
| 235 | break; |
| 236 | case MatchType::Glob: |
| 237 | result = globMatchTree( match, max, basePath ); |
| 238 | break; |
| 239 | } |
| 240 | res( result ); |
| 241 | } ); |
| 242 | } |
| 243 | |
| 244 | std::shared_ptr<FileListModel> |
| 245 | ProjectDirectoryTree::asModel( const size_t& max, const std::vector<CommandInfo>& prependCommands, |
no test coverage detected