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

Function getLevelDatDataFromFS

launcher/minecraft/World.cpp:171–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171QByteArray getLevelDatDataFromFS(const QFileInfo &file)
172{
173 auto fullFilePath = getLevelDatFromFS(file);
174 if(fullFilePath.isNull())
175 {
176 return QByteArray();
177 }
178 QFile f(fullFilePath);
179 if(!f.open(QIODevice::ReadOnly))
180 {
181 return QByteArray();
182 }
183 return f.readAll();
184}
185
186bool putLevelDatDataToFS(const QFileInfo &file, QByteArray & data)
187{

Callers 2

readFromFSMethod · 0.85
renameMethod · 0.85

Calls 3

getLevelDatFromFSFunction · 0.85
QByteArrayClass · 0.85
openMethod · 0.80

Tested by

no test coverage detected