qt 获取文件夹中文件名

来源:互联网 发布:微信附近人v1数据采集 编辑:程序博客网 时间:2024/06/05 17:48
bool TerminalCommand::command_cleancache(QString path){
    QDir dir(path);
    QFileInfoList f_list=dir.entryInfoList();
    dir.setFilter(QDir::Files|QDir::NoDot|QDir::NoDotAndDotDot|QDir::NoSymLinks);
    for(int i=0;i<f_list.count();i++){
            QFileInfo f_info=f_list.at(i);
            QString stt=f_info.fileName();
            qDebug()<<stt;
    }
    return true;
}
0 0
原创粉丝点击