I have inherited some code using boost's directory_iterator
:
for (directory_iterator fileIt{currDir}; fileIt != directory_iterator{}; ++fileIt) {
// Do stuff with files
}
and I would like to process the files in a particular order (simple alphabetical sorting would do). Is there any way to achieve this, i.e. to enforce the iterator to give me files according to some sorting instead of the default?