开发者

Boost filesystem iterator

开发者 https://www.devze.com 2023-02-03 19:47 出处:网络
Just starting to learn boost::filesystem. What is a differen开发者_开发技巧ce between directory_iterator and basic_path::iterator?

Just starting to learn boost::filesystem.

  1. What is a differen开发者_开发技巧ce between directory_iterator and basic_path::iterator?
  2. Do the iterators iterate files in lexicographical order?

Thanks


  1. 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 and d.

    directory_iterator will instead iterate through files in a directory.

  2. No, directory_iterator will not sort files, they'll be returned in the same order as your operating system calls do.

0

精彩评论

暂无评论...
验证码 换一张
取 消