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

Function getLevelDatDataFromFS

launcher/minecraft/World.cpp:150–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150QByteArray getLevelDatDataFromFS(const QFileInfo &file)
151{
152 auto fullFilePath = getLevelDatFromFS(file);
153 if(fullFilePath.isNull())
154 {
155 return QByteArray();
156 }
157 QFile f(fullFilePath);
158 if(!f.open(QIODevice::ReadOnly))
159 {
160 return QByteArray();
161 }
162 return f.readAll();
163}
164
165bool putLevelDatDataToFS(const QFileInfo &file, QByteArray & data)
166{

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