[SOLVED] Expanding wildcards in directory paths
-
I'm a newbie to C++/Qt.
Looking at the docs for QDir, one can filter for a "type" of file (eg: *.txt) however can QDir expand wildcards in the path?
For example if I have the following dir structure:
@
foo
-> bar
-> one.txt
-> two.txt
@
If I was above foo, and wanted to find foo//.txt how would one do it with QDir? Is it even possible? Or would I have to do a manual walk over the segments in the path? -
You will have to manually walk through the subdirs. For filtering, have a look at "QDir::entryInfoList() ":http://doc.qt.nokia.com/4.7/qdir.html#entryInfoList