MCPcopy Create free account
hub / github.com/MultiMC/Launcher / removeJar

Method removeJar

launcher/minecraft/launch/ModMinecraftJar.cpp:69–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69bool ModMinecraftJar::removeJar()
70{
71 auto m_inst = std::dynamic_pointer_cast<MinecraftInstance>(m_parent->instance());
72 auto finalJarPath = QDir(m_inst->binRoot()).absoluteFilePath("minecraft.jar");
73 QFile finalJar(finalJarPath);
74 if(finalJar.exists())
75 {
76 if(!finalJar.remove())
77 {
78 return false;
79 }
80 }
81 return true;
82}

Callers

nothing calls this directly

Calls 5

existsMethod · 0.80
QDirClass · 0.50
instanceMethod · 0.45
binRootMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected