| 226 | } |
| 227 | |
| 228 | void 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 | |
| 240 | QByteArray read(const QString& filename) |
| 241 | { |
no test coverage detected