MCPcopy Create free account
hub / github.com/BYVoid/OpenCC / NewFilesystemResourceProvider

Function NewFilesystemResourceProvider

src/Config.cpp:715–730  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

713}
714
715std::shared_ptr<ResourceProvider>
716NewFilesystemResourceProvider(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

Callers 2

NewFromFileMethod · 0.85
NewFromStringMethod · 0.85

Calls 2

emptyMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected