如何从C或C++代码中确定目录中的文件列表?
我不允许执行ls命令并从我的程序中解析结果.
ls
c c++ directory file
我想在以下模式中检索此模式后面的所有匹配路径vector<string>:
vector<string>
"/some/path/img*.png"
我怎么能这么做呢?
c++ unix glob
c++ ×2
c ×1
directory ×1
file ×1
glob ×1
unix ×1