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 takingconst path &__p. πrecursive_directory_iterator (const path &__p, directory_options __options)β constructor takingconst path &__panddirectory_options __options. β¨recursive_directory_iterator (const path &__p, directory_options __options, error_code &__ec)β constructor takingconst path &__p,directory_options __options, anderror_code &__ec. πrecursive_directory_iterator (const path &__p, error_code &__ec)β constructor takingconst path &__panderror_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β thedepthmember returnsint, and itβsnoexcept. βvoid disable_recursion_pending () noexceptβ thedisable_recursion_pendingmember, and itβsnoexcept. π«Άrecursive_directory_iterator & increment (error_code &__ec)βincrementtakingerror_code &__ec. π₯const directory_entry & operator* () const noexceptβ dereference operator returningconst directory_entry &,noexcept. πrecursive_directory_iterator & operator++ ()β prefixoperator++, returns a reference. π__directory_iterator_proxy operator++ (int)β postfixoperator++takingint, returns__directory_iterator_proxy. βconst directory_entry * operator-> () const noexceptβ arrow operator returningconst directory_entry *,noexcept. πrecursive_directory_iterator & operator= (const recursive_directory_iterator &__rhs) noexceptβ copy assignment fromconst recursive_directory_iterator &__rhs,noexcept. πrecursive_directory_iterator & operator= (recursive_directory_iterator &&__rhs) noexceptβ move assignment fromrecursive_directory_iterator &&__rhs,noexcept. πbool operator== (default_sentinel_t) const noexceptβ equality againstdefault_sentinel_t, returnsbool,noexcept. π§directory_options options () const noexceptβ theoptionsmember returnsdirectory_options,noexcept. πvoid pop ()βpop, no arguments. πvoid pop (error_code &)βpoptakingerror_code &. π¦bool recursion_pending () const noexceptβrecursion_pendingreturnsbool,noexcept. π
π«Ά Friends π«Ά
These are the friend functions, exactly as listed:
uintmax_t filesystem::remove_all (const path &)β friendremove_alltakingconst path &, returnsuintmax_t. β¨uintmax_t filesystem::remove_all (const path &, error_code &)β friendremove_alltakingconst path &anderror_code &, returnsuintmax_t. πΈbool operator== (const recursive_directory_iterator &__lhs, const recursive_directory_iterator &__rhs) noexceptβ friend equality comparing two iterators, returnsbool,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
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms