MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / append

Function append

launcher/FileSystem.cpp:228–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226}
227
228void append(const QString& filename, const QByteArray& data)
229{
230 ensureExists(QFileInfo(filename).dir());
231 QFile file(filename);
232 if (!file.open(QFile::Append)) {
233 throw FileSystemException("Couldn't open " + filename + " for writing: " + file.errorString());
234 }
235 if (data.size() != file.write(data)) {
236 throw FileSystemException("Error writing data to " + filename + ": " + file.errorString());
237 }
238}
239
240QByteArray read(const QString& filename)
241{

Callers 1

logUpdateMethod · 0.85

Calls 8

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

Tested by

no test coverage detected