MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / removeJar

Method removeJar

launcher/minecraft/launch/ModMinecraftJar.cpp:88–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88bool ModMinecraftJar::removeJar()
89{
90 auto m_inst = std::dynamic_pointer_cast<MinecraftInstance>(m_parent->instance());
91 auto finalJarPath = QDir(m_inst->binRoot()).absoluteFilePath("minecraft.jar");
92 QFile finalJar(finalJarPath);
93 if(finalJar.exists())
94 {
95 if(!finalJar.remove())
96 {
97 return false;
98 }
99 }
100 return true;
101}

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected