std::filesyste...ectory_iterator(3cxx)

okay so bestie, welcome to the std::filesyste...ectory_iterator(3cxx) page β€” that’s the 3cxx manual section β€” and it is literally all about std::filesystem::recursive_directory_iterator. This iterator is your main character for walking a directory hierarchy recursively. No cap. πŸ’…βœ¨


πŸ’Œ NAME πŸ’Œ

std::filesystem::recursive_directory_iterator β€” Iterator type for recursively traversing a directory hierarchy. That’s the name, that’s the vibe, and yes it’s giving recursive directory traversal energy. πŸ¦‹

✨ SYNOPSIS ✨

#include <filesystem>

That’s the include, periodt. πŸ’–

🌈 Public Types 🌈

Here are the exact typedefs, bestie β€” every single one is iconic:

  • typedef ptrdiff_t difference_type β€” the difference type, slay. πŸŽ€
  • typedef input_iterator_tag iterator_category β€” input iterator category, noted. 🌸
  • typedef const directory_entry * pointer β€” pointer type, exactly as written. πŸ¦‹
  • typedef const directory_entry & reference β€” reference type, exactly as written. πŸ’…
  • typedef directory_entry value_type β€” value type, exactly as written. ⭐

πŸŽ€ Public Member Functions πŸŽ€

Every signature, no skips, no cap:

  • recursive_directory_iterator (const path &__p) β€” constructor taking const path &__p. πŸ’–
  • recursive_directory_iterator (const path &__p, directory_options __options) β€” constructor taking const path &__p and directory_options __options. ✨
  • recursive_directory_iterator (const path &__p, directory_options __options, error_code &__ec) β€” constructor taking const path &__p, directory_options __options, and error_code &__ec. πŸŽ€
  • recursive_directory_iterator (const path &__p, error_code &__ec) β€” constructor taking const path &__p and error_code &__ec. πŸ¦‹
  • recursive_directory_iterator (const recursive_directory_iterator &)=default β€” copy constructor, defaulted. πŸ’…
  • recursive_directory_iterator (recursive_directory_iterator &&)=default β€” move constructor, defaulted. 🌸
  • int depth () const noexcept β€” the depth member returns int, and it’s noexcept. ⭐
  • void disable_recursion_pending () noexcept β€” the disable_recursion_pending member, and it’s noexcept. 🫢
  • recursive_directory_iterator & increment (error_code &__ec) β€” increment taking error_code &__ec. πŸ”₯
  • const directory_entry & operator* () const noexcept β€” dereference operator returning const directory_entry &, noexcept. πŸ‘‘
  • recursive_directory_iterator & operator++ () β€” prefix operator++, returns a reference. 🌈
  • __directory_iterator_proxy operator++ (int) β€” postfix operator++ taking int, returns __directory_iterator_proxy. ⭐
  • const directory_entry * operator-> () const noexcept β€” arrow operator returning const directory_entry *, noexcept. πŸ’€
  • recursive_directory_iterator & operator= (const recursive_directory_iterator &__rhs) noexcept β€” copy assignment from const recursive_directory_iterator &__rhs, noexcept. πŸ™ˆ
  • recursive_directory_iterator & operator= (recursive_directory_iterator &&__rhs) noexcept β€” move assignment from recursive_directory_iterator &&__rhs, noexcept. πŸ“
  • bool operator== (default_sentinel_t) const noexcept β€” equality against default_sentinel_t, returns bool, noexcept. 🧚
  • directory_options options () const noexcept β€” the options member returns directory_options, noexcept. πŸ’œ
  • void pop () β€” pop, no arguments. πŸŽ€
  • void pop (error_code &) β€” pop taking error_code &. πŸ¦‹
  • bool recursion_pending () const noexcept β€” recursion_pending returns bool, noexcept. πŸ’–

🫢 Friends 🫢

These are the friend functions, exactly as listed:

  • uintmax_t filesystem::remove_all (const path &) β€” friend remove_all taking const path &, returns uintmax_t. ✨
  • uintmax_t filesystem::remove_all (const path &, error_code &) β€” friend remove_all taking const path & and error_code &, returns uintmax_t. 🌸
  • bool operator== (const recursive_directory_iterator &__lhs, const recursive_directory_iterator &__rhs) noexcept β€” friend equality comparing two iterators, returns bool, noexcept. πŸ’…

πŸ”₯ Detailed Description πŸ”₯

std::filesystem::recursive_directory_iterator is an iterator type for recursively traversing a directory hierarchy. That’s the detailed description and it ate. πŸ”₯

⭐ Since ⭐

C++17 β€” since C++17, bestie. This one is giving modern C++ energy. πŸ‘‘

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code. So Doxygen wrote it, not a human, but we still dressed it up cute. πŸ’–


mwah πŸ’‹ β€” sourced from libstdc++ (the source/version footer tag is libstdstd::filesyste...ectory_iterator(3cxx)), and no separate date is listed on this page. bye bestie, go traverse recursively! 🫢✨

πŸ“¦ where this page comes from