📅  最后修改于: 2022-03-11 14:44:57.983000             🧑  作者: Mango
#include
#include
#include
namespace fs = std::filesystem;
int main()
{
std::string path = "/path/to/directory";
for (const auto & entry : fs::directory_iterator(path))
std::cout << entry.path() << std::endl;
}