A collection of file utility functions.
More...
#include <FileUtils.h++>
A collection of file utility functions.
- Author
- Mark Lindner
◆ computeMD5()
static QByteArray computeMD5 |
( |
const QString & |
path | ) |
|
|
static |
Computes the MD5 digest for a file.
- Parameters
-
path | The path to the file. |
- Returns
- The MD5 digest for the file, as a byte array.
◆ createFile()
static bool createFile |
( |
const QString & |
path | ) |
|
|
static |
Creates an empty file.
- Parameters
-
path | The path to the file. |
- Returns
true
if the file was successfully created or it already existed; false
otherwise.
◆ readFileToString()
static QString readFileToString |
( |
const QString & |
path | ) |
|
|
static |
Reads the contents of a file into a string.
- Parameters
-
path | The path to the file. |
- Returns
- A string containing the contents of the file.
◆ writeStringToFile()
static void writeStringToFile |
( |
const QString & |
path, |
|
|
const QString & |
text |
|
) |
| |
|
static |
Writes a string to a file.
If the file already exists, it is truncated and overwritten.
- Parameters
-
path | The path to the file. |
text | The text to write to the file. |
The documentation for this class was generated from the following file: