MCPcopy Create free account
hub / github.com/ModOrganizer2/modorganizer / globalInstancePaths

Method globalInstancePaths

src/instancemanager.cpp:566–584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

564}
565
566std::vector<QString> InstanceManager::globalInstancePaths() const
567{
568 const QDir root(globalInstancesRootPath());
569 const auto dirs = root.entryList(QDir::Dirs | QDir::NoDotAndDotDot);
570
571 std::vector<QString> list;
572
573 for (auto&& d : dirs) {
574 const QFileInfo iniFile(QDir(root.filePath(d)), "ModOrganizer.ini");
575 log::debug("Checking for INI at path '{}'", iniFile.absoluteFilePath());
576
577 if (iniFile.exists()) {
578 log::debug("Found INI at path '{}'", iniFile.absoluteFilePath());
579 list.push_back(root.filePath(d));
580 }
581 }
582
583 return list;
584}
585
586bool InstanceManager::hasAnyInstances() const
587{

Callers 1

updateInstancesMethod · 0.80

Calls 2

QDirClass · 0.85
existsMethod · 0.45

Tested by

no test coverage detected