MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / findBinPath

Function findBinPath

launcher/java/download/SymlinkTask.cpp:26–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24SymlinkTask::SymlinkTask(QString final_path) : m_path(final_path) {}
25
26QString findBinPath(QString root, QString pattern)
27{
28 auto path = FS::PathCombine(root, pattern);
29 if (QFileInfo::exists(path)) {
30 return path;
31 }
32
33 auto entries = QDir(root).entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot);
34 for (auto& entry : entries) {
35 path = FS::PathCombine(entry.absoluteFilePath(), pattern);
36 if (QFileInfo::exists(path)) {
37 return path;
38 }
39 }
40
41 return {};
42}
43
44void SymlinkTask::executeTask()
45{

Callers 1

executeTaskMethod · 0.85

Calls 2

PathCombineFunction · 0.85
QDirClass · 0.50

Tested by

no test coverage detected