私は次のようなパスを持っています:
C:\path\to\my*file\
対応するフルパスを取得したい(存在する場合):
C:\path\to\my1file\
このQtコードで試しましたが、結果は最初に持っていたのと同じパスです:
QStringList filters;
filters << "C:/path/to/my*file/";
QDir dir;
dir.setNameFilters(filters);
QStringList dirs = dir.entryList(filters);
_path = dirs.at(0); // get the first path only
フィルターを通過するすべてのファイル/ディレクトリを取得するべきではありませんか?
_path が "C:/path/to/my*file/" と等しいのはなぜですか?
C++98/STLのみで同じことはできますか? (このプロジェクトでは、Boost/C++11 を使用できません)。