MCPcopy Create free account
hub / github.com/DFHack/dfhack / listPlugins

Method listPlugins

library/PluginManager.cpp:921–936  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

919}
920
921std::vector<string> PluginManager::listPlugins()
922{
923 std::vector<string> results;
924 std::vector<std::filesystem::path> files;
925 Filesystem::listdir(getPluginPath(), files);
926 for (auto file = files.begin(); file != files.end(); ++file)
927 {
928 string fname = file->filename().string();
929 if (hasEnding(file->filename().string(), plugin_suffix))
930 {
931 string shortname = fname.substr(0, fname.find(plugin_suffix));
932 results.push_back(shortname);
933 }
934 }
935 return results;
936}
937
938void PluginManager::refresh()
939{

Callers

nothing calls this directly

Calls 5

getPluginPathFunction · 0.85
filenameMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected