| 713 | } |
| 714 | |
| 715 | std::shared_ptr<ResourceProvider> |
| 716 | NewFilesystemResourceProvider(const std::string& configDirectory, |
| 717 | const std::vector<std::string>& paths) { |
| 718 | std::vector<std::string> searchPaths; |
| 719 | if (!configDirectory.empty()) { |
| 720 | searchPaths.push_back(configDirectory); |
| 721 | } |
| 722 | searchPaths.push_back("."); |
| 723 | for (const std::string& path : paths) { |
| 724 | if (!path.empty()) { |
| 725 | searchPaths.push_back(path); |
| 726 | } |
| 727 | } |
| 728 | return std::shared_ptr<ResourceProvider>( |
| 729 | new FilesystemResourceProvider(searchPaths)); |
| 730 | } |
| 731 | |
| 732 | } // namespace |
| 733 |
no test coverage detected