标签:
QString proFile(t_path);
proFile.append("/dir");
QFileInfo proFileInfo(proFile);
if(proFileInfo.exists()) {
//
}
QString t_tmpDir(theDir);
t_tmpDir.append("/tmp");
QFileInfo t_tmpDirInfo(t_tmpDir);
QDir* t_dir = new QDir;
if(t_tmpDirInfo.isDir()) {
QString t_oldTmpDir(theDir);
QDate date;
QTime time;
QDateTime dt;
dt.setTime(time.currentTime());
dt.setDate(date.currentDate());
QString currentDate = dt.toString("yyyy-MM-dd-hh-mm-ss");
t_oldTmpDir.append("/");
t_oldTmpDir.append(currentDate);
t_dir->rename(t_tmpDir, t_oldTmpDir);
}
t_dir->mkdir(t_tmpDir);
FILE* fp = fopen(t_pro.toStdString().c_str(), "r");
int t_count = 0;
fscanf(fp, "%*d%*d%*d%*d%d", &t_count);
fclose(fp);
标签:
原文地址:http://www.cnblogs.com/imagezy/p/5143761.html