utime(QFile::encodeName(path), &utbuf);
#elif defined(Q_OS_WIN)
struct _utimbuf utbuf;
- utbuf.actime = mtime.toTime_t();
+ utbuf.actime = mtime.toSecsSinceEpoch();
utbuf.modtime = utbuf.actime;
_wutime(reinterpret_cast<const wchar_t *>(path.utf16()), &utbuf);
#endif
QFile::remove(absolutePath);
}
+void TestDir::removeDir(const QString& path)
+{
+ QString absolutePath = path;
+ QFileInfo fileInfo(absolutePath);
+ if (!fileInfo.isAbsolute()) {
+ absolutePath = TestDir::path() + QLatin1Char('/') + path;
+ }
+ QDir dirToRemove = QDir(absolutePath);
+ dirToRemove.removeRecursively();
+}
+
void TestDir::makePathAbsoluteAndCreateParents(QString& path)
{
QFileInfo fileInfo(path);