int FindFiles(const QString& fileFullPath ,QStringList & listFullPath )
{
{
QFileInfo fileInfoFullPath(fileFullPath);
if (!fileInfoFullPath.isDir())
{
listFullPath.push_back(fileInfoFullPath.filePath());
return 3;
}
}
QDir dir(fileFullPath);
if (!dir.exists())
return 1;
dir.setFilter(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot);
dir.setSorting(QDir::DirsFirst);
QFileInfoList list = dir.entryInfoList();
if (list.size() < 1)
return 2;
int i = 0;
do {
QFileInfo fileInfo = list.at(i);
bool bisDir = fileInfo.isDir();
if (bisDir) {
FindFiles(fileInfo.filePath(), listFullPath);
}
else
{
listFullPath.push_back(fileInfo.filePath());
}
++i;
} while (i < list.size());
return 0;
}