std::files...tory_entry(3)
π
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 aconst filesystem::path &__p.directory_entry (const filesystem::path &__p, error_code &__ec)β same path vibe, but you also hand over anerror_code &__ec.directory_entry (directory_entry &&) noexcept=defaultβ the move constructor,noexceptand 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 anerror_code &__ecslot for you.bool exists () constβ the existence check, returnsbool,const. simple. iconic.bool exists (error_code &__ec) const noexceptβ the existence check again but witherror_code &__ec, and this one'snoexceptπuintmax_t file_size () constβ file size, returnsuintmax_t,const.uintmax_t file_size (error_code &__ec) const noexceptβ file size witherror_code &__ecandnoexcept.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 witherror_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 &__ecedition,noexcept.bool is_character_file () constβ character file?bool.const.bool is_character_file (error_code &__ec) const noexceptβ character file,error_code &__ecedition,noexcept.bool is_directory () constβ the directory question, answered inbool,const.bool is_directory (error_code &__ec) const noexceptβ directory question witherror_code &__ec,noexcept.bool is_fifo () constβ fifo check,bool,const.bool is_fifo (error_code &__ec) const noexceptβ fifo check witherror_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 witherror_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 witherror_code &__ec,noexcept.bool is_socket () constβ socket check,bool,const.bool is_socket (error_code &__ec) const noexceptβ socket check witherror_code &__ec,noexcept.bool is_symlink () constβ symlink check,bool,const.bool is_symlink (error_code &__ec) const noexceptβ symlink check witherror_code &__ec,noexcept.file_time_type last_write_time () constβ last write time, returnsfile_time_type,const.file_time_type last_write_time (error_code &__ec) const noexceptβ last write time witherror_code &__ec,noexcept.operator const filesystem::path & () const noexceptβ a conversion toconst filesystem::path &, and it'snoexcept. she converts β¨bool operator!= (const directory_entry &__rhs) const noexceptβ not-equal againstconst 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, returnsdirectory_entry &, defaulted π«Άdirectory_entry & operator= (directory_entry &&) noexcept=defaultβ move assignment, returnsdirectory_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 aconst 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, takeserror_code &__ec, and it'snoexcept.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 anerror_code &__ecalongside.file_status status () constβ returnsfile_status,const.file_status status (error_code &__ec) const noexceptβ returnsfile_status, witherror_code &__ec,noexcept.file_status symlink_status () constβ returnsfile_statusfor symlink status,const.file_status symlink_status (error_code &__ec) const noexceptβ symlink status witherror_code &__ec,noexcept.
not me noticing the pattern: theerror_code &__ecoverloads all snaggednoexceptwhile 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_CharTand_Traits, taking__osand__d, returningbasic_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
- centos-stream 9: libstdc++-docs 11.5.0-16.el9 Β· GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms