diff options
author | Jesper K. Pedersen <jesper.pedersen@kdab.com> | 2013-05-21 08:33:41 +0000 |
---|---|---|
committer | Jesper K. Pedersen <jesper.pedersen@kdab.com> | 2013-05-22 15:32:33 +0200 |
commit | 20604c28517aa4e318393598cf3d86d5ce113b77 (patch) | |
tree | 5f4bc321dc650bf04e8e8f418510f4fc732d73d3 /utils/utils.cpp | |
parent | 5439e054f33fb62fcecf497ebf5152a0fe508de8 (diff) |
make it possible to touch a file so it gets created if it doesn't exists
Change-Id: I876a4b6f683c2183925bf19300b88a9332db5514
Reviewed-by: Jesper K. Pedersen <jesper.pedersen@kdab.com>
Diffstat (limited to 'utils/utils.cpp')
-rw-r--r-- | utils/utils.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/utils/utils.cpp b/utils/utils.cpp index 9cb341a..9208b45 100644 --- a/utils/utils.cpp +++ b/utils/utils.cpp @@ -75,6 +75,13 @@ bool Scripting::Internal::Utils::copyFile(const QString &from, const QString &to return true; } +void Utils::touchFile(const QString &fileName) +{ + QFile file(fileName); + file.open(QFile::Append); + file.close(); +} + } // namespace Internal } // namespace Scripting |