Helper class with file helper functions.
More...
#include <fileUtils.h>
|
static QString | readFromFile (const QString &fileName) |
| Reads all file contents and returns it as sting or throws an exception. More...
|
|
static void | writeToFile (const QString &fileName, const QString &contents, const QString &dirPath="") |
| Writes given string to given file, throws exception if something went wrong. More...
|
|
static QDomElement | readXmlFile (const QString &fileNameWithPath) |
| Reads given XML file and returns root element, throws exception if something went wrong. More...
|
|
static QString | normalizePath (const QString &path) |
| Returns absolute path by given path, adds "/" to the right if needed. More...
|
|
Helper class with file helper functions.
QString FileUtils::normalizePath |
( |
const QString & |
path | ) |
|
|
static |
Returns absolute path by given path, adds "/" to the right if needed.
QString FileUtils::readFromFile |
( |
const QString & |
fileName | ) |
|
|
static |
Reads all file contents and returns it as sting or throws an exception.
QDomElement FileUtils::readXmlFile |
( |
const QString & |
fileNameWithPath | ) |
|
|
static |
Reads given XML file and returns root element, throws exception if something went wrong.
void FileUtils::writeToFile |
( |
const QString & |
fileName, |
|
|
const QString & |
contents, |
|
|
const QString & |
dirPath = "" |
|
) |
| |
|
static |
Writes given string to given file, throws exception if something went wrong.
The documentation for this class was generated from the following files: