MCPcopy Create free account
hub / github.com/ElyPrismLauncher/Launcher / append

Function append

launcher/FileSystem.cpp:215–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213}
214
215void append(const QString& filename, const QByteArray& data)
216{
217 ensureExists(QFileInfo(filename).dir());
218 QFile file(filename);
219 if (!file.open(QFile::Append)) {
220 throw FileSystemException("Couldn't open " + filename + " for writing: " + file.errorString());
221 }
222 if (data.size() != file.write(data)) {
223 throw FileSystemException("Error writing data to " + filename + ": " + file.errorString());
224 }
225}
226
227QByteArray read(const QString& filename)
228{

Callers 1

logUpdateMethod · 0.85

Calls 8

ensureExistsFunction · 0.85
QFileInfoClass · 0.85
FileSystemExceptionClass · 0.85
dirMethod · 0.80
errorStringMethod · 0.80
openMethod · 0.45
sizeMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected