summaryrefslogtreecommitdiffstats
path: root/tests/shared
diff options
context:
space:
mode:
Diffstat (limited to 'tests/shared')
-rw-r--r--tests/shared/filesystem.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/shared/filesystem.h b/tests/shared/filesystem.h
index 079a6dc..8274346 100644
--- a/tests/shared/filesystem.h
+++ b/tests/shared/filesystem.h
@@ -87,6 +87,16 @@ struct FileSystem
return false;
}
+ qint64 createFileWithContent(const QString &fileName)
+ {
+ QFile file(fileName);
+ if (file.open(QIODevice::WriteOnly)) {
+ createdFiles << fileName;
+ return file.write(fileName.toUtf8());
+ }
+ return -1;
+ }
+
bool createLink(const QString &destination, const QString &linkName)
{
if (QFile::link(destination, linkName)) {