refs #777 Utilities for reading/writing files while holding a QLockFile.

This commit is contained in:
Mathew Sutcliffe
2016-10-17 21:31:33 +01:00
committed by Klaus Basan
parent cf9b6f039c
commit 7f422eb3e4
2 changed files with 29 additions and 0 deletions

View File

@@ -41,12 +41,21 @@ namespace BlackMisc
//! Write string to text file
static bool writeStringToFile(const QString &content, const QString &fileNameAndPath);
//! Write string to file, with a lock so two applications can't access at the same time
static bool writeStringToLockedFile(const QString &content, const QString &fileNameAndPath);
//! Read file into string
static QString readFileToString(const QString &fileNameAndPath);
//! Read file into string, with a lock so two applications can't access at the same time
static QString readLockedFileToString(const QString &fileNameAndPath);
//! Read file into string
static QString readFileToString(const QString &filePath, const QString &fileName);
//! Read file into string, with a lock so two applications can't access at the same time
static QString readLockedFileToString(const QString &filePath, const QString &fileName);
//! Write string to text file in background
static bool writeStringToFileInBackground(const QString &content, const QString &fileNameAndPath);