MCPcopy Create free account
hub / github.com/PDAL/PDAL / PluginDirectory

Method PluginDirectory

pdal/PluginDirectory.cpp:119–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117
118
119PluginDirectory::PluginDirectory()
120{
121 for (const auto& dir : pluginSearchPaths())
122 {
123 // Don't try to list the directory if it
124 // doesn't exist
125 if (!FileUtils::directoryExists(dir))
126 continue;
127
128 StringList files = FileUtils::directoryList(dir);
129 for (auto& file : files)
130 {
131 file = FileUtils::toAbsolutePath(file);
132
133 std::string plugin;
134 plugin = validPlugin(file, {"kernel"});
135 if (plugin.size())
136 {
137 m_kernels.insert(std::make_pair(plugin, file));
138 continue;
139 }
140 plugin = validPlugin(file, {"reader", "writer", "filter"});
141 if (plugin.size())
142 m_drivers.insert(std::make_pair(plugin, file));
143 }
144 }
145}
146
147std::string PluginDirectory::test_validPlugin(const std::string& path,
148 const StringList& types)

Callers

nothing calls this directly

Calls 7

pluginSearchPathsFunction · 0.85
directoryExistsFunction · 0.85
directoryListFunction · 0.85
toAbsolutePathFunction · 0.85
validPluginFunction · 0.85
sizeMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected