std::files...tory_entry(3)

πŸ“¦ version 11.5.0, in centos-stream 9

πŸ’… std::files...tory_entry(3) β€” Library Functions Manual, straight outta libstdc++

okay so bestie, welcome to the glow-up of your filesystem era ✨ this one's a C++ manpage from libstdc++ (yes, the Library Functions Manual one) and honestly? she's an icon. let's get into it πŸŽ€


🌸 NAME

std::filesystem::directory_entry β€” the value type used by directory iterators. that's literally the whole description and she's serving main character energy with it πŸ’…


✨ SYNOPSIS ✨

🫢 Public Member Functions

  • directory_entry (const directory_entry &)=default β€” the copy constructor, and it's defaulted. no cap, the compiler is doing the work for you 🫢
  • directory_entry (const filesystem::path &__p) β€” make a fresh one from a const filesystem::path &__p.
  • directory_entry (const filesystem::path &__p, error_code &__ec) β€” same path vibe, but you also hand over an error_code &__ec.
  • directory_entry (directory_entry &&) noexcept=default β€” the move constructor, noexcept and defaulted. move like a queen πŸ¦‹
  • void assign (const filesystem::path &__p) β€” reassign this entry to __p.
  • void assign (const filesystem::path &__p, error_code &__ec) β€” same thing, plus an error_code &__ec slot for you.
  • bool exists () const β€” the existence check, returns bool, const. simple. iconic.
  • bool exists (error_code &__ec) const noexcept β€” the existence check again but with error_code &__ec, and this one's noexcept πŸ’–
  • uintmax_t file_size () const β€” file size, returns uintmax_t, const.
  • uintmax_t file_size (error_code &__ec) const noexcept β€” file size with error_code &__ec and noexcept.
  • uintmax_t hard_link_count () const β€” hard link count, uintmax_t, const.
  • uintmax_t hard_link_count (error_code &__ec) const noexcept β€” hard link count with error_code &__ec, noexcept.
  • bool is_block_file () const β€” block file? bool. const.
  • bool is_block_file (error_code &__ec) const noexcept β€” block file, error_code &__ec edition, noexcept.
  • bool is_character_file () const β€” character file? bool. const.
  • bool is_character_file (error_code &__ec) const noexcept β€” character file, error_code &__ec edition, noexcept.
  • bool is_directory () const β€” the directory question, answered in bool, const.
  • bool is_directory (error_code &__ec) const noexcept β€” directory question with error_code &__ec, noexcept.
  • bool is_fifo () const β€” fifo check, bool, const.
  • bool is_fifo (error_code &__ec) const noexcept β€” fifo check with error_code &__ec, noexcept.
  • bool is_other () const β€” the "other" check, bool, const. mysterious. love that for her πŸ•΅οΈ
  • bool is_other (error_code &__ec) const noexcept β€” "other" check with error_code &__ec, noexcept.
  • bool is_regular_file () const β€” regular file check, bool, const.
  • bool is_regular_file (error_code &__ec) const noexcept β€” regular file check with error_code &__ec, noexcept.
  • bool is_socket () const β€” socket check, bool, const.
  • bool is_socket (error_code &__ec) const noexcept β€” socket check with error_code &__ec, noexcept.
  • bool is_symlink () const β€” symlink check, bool, const.
  • bool is_symlink (error_code &__ec) const noexcept β€” symlink check with error_code &__ec, noexcept.
  • file_time_type last_write_time () const β€” last write time, returns file_time_type, const.
  • file_time_type last_write_time (error_code &__ec) const noexcept β€” last write time with error_code &__ec, noexcept.
  • operator const filesystem::path & () const noexcept β€” a conversion to const filesystem::path &, and it's noexcept. she converts ✨
  • bool operator!= (const directory_entry &__rhs) const noexcept β€” not-equal against const directory_entry &__rhs, bool, const, noexcept.
  • bool operator< (const directory_entry &__rhs) const noexcept β€” less-than against __rhs, bool, const, noexcept.
  • bool operator<= (const directory_entry &__rhs) const noexcept β€” less-or-equal against __rhs, bool, const, noexcept.
  • directory_entry & operator= (const directory_entry &)=default β€” copy assignment, returns directory_entry &, defaulted 🫢
  • directory_entry & operator= (directory_entry &&) noexcept=default β€” move assignment, returns directory_entry &, noexcept, defaulted. ate πŸ’…
  • bool operator== (const directory_entry &__rhs) const noexcept β€” equality against __rhs, bool, const, noexcept.
  • bool operator> (const directory_entry &__rhs) const noexcept β€” greater-than against __rhs, bool, const, noexcept.
  • bool operator>= (const directory_entry &__rhs) const noexcept β€” greater-or-equal against __rhs, bool, const, noexcept.
  • const filesystem::path & path () const noexcept β€” hands you back a const filesystem::path &, const, noexcept. the way she just gives you the path 😭
  • void refresh () β€” refreshes. void, no args.
  • void refresh (error_code &__ec) noexcept β€” refreshes, takes error_code &__ec, and it's noexcept.
  • void replace_filename (const filesystem::path &__p) β€” swaps in a new filename from __p.
  • void replace_filename (const filesystem::path &__p, error_code &__ec) β€” same, with an error_code &__ec alongside.
  • file_status status () const β€” returns file_status, const.
  • file_status status (error_code &__ec) const noexcept β€” returns file_status, with error_code &__ec, noexcept.
  • file_status symlink_status () const β€” returns file_status for symlink status, const.
  • file_status symlink_status (error_code &__ec) const noexcept β€” symlink status with error_code &__ec, noexcept.
not me noticing the pattern: the error_code &__ec overloads all snagged noexcept while the no-arg ones didn't. iykyk πŸ‘€ that's just what the page says, so that's what we're saying.

πŸ‘― Friends

  • struct _Dir β€” a friend struct, underscore-and-all. very private, very exclusive 🌈
  • class directory_iterator β€” friend class. this whole page literally exists for her πŸ’–
  • template<typename _CharT , typename _Traits > basic_ostream< _CharT, _Traits > & operator<< (basic_ostream< _CharT, _Traits > &__os, const directory_entry &__d) β€” the stream insertion operator, fully templated on _CharT and _Traits, taking __os and __d, returning basic_ostream< _CharT, _Traits > &. verbatim bestie, copying it exactly πŸŽ€
  • class recursive_directory_iterator β€” friend class too, the recursive one πŸŒ€

πŸ¦‹ Detailed Description

The value type used by directory iterators.

that's it. that's the whole description. short, sweet, absolutely slaying, no notes πŸ’…


🧚 Author

Generated automatically by Doxygen for libstdc++ from the source code. β€” no human wrote this, a robot did, and she still ate πŸ”₯


okay bestie that's the whole page, every single flag-signature-thing intact, no skips, no cap 🌸 this was libstdc++, dated Wed Oct 7 2026, filed under std::files...tory_entry(3). go forth and iterate directories, you gorgeous genius πŸ«Άβœ¨πŸŽ€

πŸ“¦ where this page comes from