MCPcopy Create free account
hub / github.com/BabitMF/bmf / uninstall_module

Function uninstall_module

bmf/cmd/src/module_manager.cpp:166–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164}
165
166int uninstall_module(std::string module_name) {
167 auto module_path = module_root_path / ("Module_" + module_name);
168 if (!fs::exists(module_path) || !fs::is_directory(module_path)) {
169 BMFLOG(BMF_WARNING)
170 << "Module:" << module_name << " is not exist" << std::endl;
171 return -1;
172 }
173 fs::remove_all(module_path);
174 std::cout << "Uninstalling the module:" << module_name << " from "
175 << module_path << " success." << std::endl;
176 return 0;
177}
178
179std::map<std::string, std::function<void()>> help_infos{
180 {"help",

Callers 1

mainFunction · 0.85

Calls 2

existsFunction · 0.85
is_directoryFunction · 0.85

Tested by

no test coverage detected