void FileSystem::setModTime(const QString& filename, time_t modTime) { struct timeval times[2]; times[0].tv_sec = times[1].tv_sec = modTime; times[0].tv_usec = times[1].tv_usec = 0; c_utimes(filename.toUtf8().data(), times); }
bool FileSystem::setModTime(const QString& filename, time_t modTime) { struct timeval times[2]; times[0].tv_sec = times[1].tv_sec = modTime; times[0].tv_usec = times[1].tv_usec = 0; int rc = c_utimes(filename.toUtf8().data(), times); if (rc != 0) { qDebug() << "Error setting mtime for" << filename << "failed: rc" << rc << ", errno:" << errno; return false; } return true; }