Static Public Member Functions | |
static QString | cdUpUntilExists (QString path) |
Moves upwards the path until it finds the path that exists. | |
static Qt::CaseSensitivity | comparisonSensitivity () |
static bool | containsPath (const QStringList &candidates, const QString &path) |
Uses QFileInfo::operator== to see if 'path' is on 'candidates' list. | |
static QByteArray | md5 (const QString &path) |
static DirErrno | mkpath (const QDir &dir) |
Try to create a directory and provide a detailed error message if it fails. | |
static bool | rmAllFiles (const QString &dirPath, const QStringList &nameFilters=QStringList()) |
Deletes all files in specified directory. | |
Definition at line 56 of file fileutils.h.
|
static |
Moves upwards the path until it finds the path that exists.
Definition at line 71 of file fileutils.cpp.
|
static |
Uses QFileInfo::operator== to see if 'path' is on 'candidates' list.
Definition at line 95 of file fileutils.cpp.
|
static |
Try to create a directory and provide a detailed error message if it fails.
If directory already exists a DirErrno with no error is returned.
Definition at line 105 of file fileutils.cpp.
|
static |
Deletes all files in specified directory.
Attempts to delete all files it can. If one file cannot be deleted then this method will proceed to the next one until all files are iterated over. Failure to delete even one file will result in 'false' being returned.
dirPath | Path to the directory. |
nameFilters | Filters as in QDir::setNameFilters(). |
filters | QDir::Filter |
Definition at line 152 of file fileutils.cpp.