The class of File operation:
QFile
QString QStringList
QFileInfo etc..
- QString strFilePath = dir.absoluteFilePath(files[i]);
- QFile file(strFilePath);
- QFileInfo fileInfo(file);
- qint64 size = fileInfo.size();
- QDateTime dateTime = fileInfo.created();
- QString strDateTime = dateTime.toString(tr("yyyy MM 月dd日 hh:mm"));
- QString strPermission;
- if (fileInfo.isWritable())
- strPermission = ("W");
- if (fileInfo.isReadable())
- strPermission.append("R");
- if (fileInfo.i***ecutable())
- strPermission.append("X");
阅读(1128) | 评论(0) | 转发(0) |