Boost filesystem iterator
-
10-10-2019 - |
문제
Just starting to learn boost::filesystem.
- What is a difference between directory_iterator and basic_path::iterator?
- Do the iterators iterate files in lexicographical order?
Thanks
해결책
path::iterator
iterates through the directory that form the path. If a path is/a/b/c/d
, it will iterate over/
,a
,b
,c
andd
.directory_iterator
will instead iterate through files in a directory.No,
directory_iterator
will not sort files, they'll be returned in the same order as your operating system calls do.
제휴하지 않습니다 StackOverflow