Getting all files in a specified folder using Boost.
Getting all files in a specified folder using Boost. Also check out how to get files of a specific type, and sorted results here! #include <boost/filesystem.hpp> #include <boost/range/iterator_range.hpp> //returns a list of all the files in a given folder. std::vector<boost::filesystem::directory_entry> GetAllFilesInFolder(boost::filesystem::path folderPath) { try { if (exists(folderPath)) // does p actually exist? { std::vector<boost::filesystem::directory_entry> files; […]