std::files...tory_entry(3)
π NAME π
std::filesystem::directory_entry β the value type used by directory iterators. That's the whole job description, and she does it flawlessly.
Okay so hi bestie, welcome to the Library Functions Manual πΈ this is the page for std::filesystem::directory_entry, the little icon that directory iterators hand you when they walk past an entry. Let's get into it π
β¨ SYNOPSIS β¨
#include <filesystem>
π Public Member Functions π
directory_entry (const directory_entry &)=defaultβ copy constructor, defaulted, zero notes, pure vibes.directory_entry (const filesystem::path &__p)β build one from afilesystem::path.directory_entry (const filesystem::path &__p, error_code &__ec)β same thing but it takes anerror_code &__ecalong for the ride.directory_entry (directory_entry &&) noexcept=defaultβ move constructor, defaulted,noexcept, iconic.void assign (const filesystem::path &__p)β assign a newfilesystem::path.void assign (const filesystem::path &__p, error_code &__ec)β theerror_code &__ectwin.bool exists () constβ does it exist, yes or no,const.bool exists (error_code &__ec) const noexceptβ theerror_code &__ecversion,constandnoexcept.uintmax_t file_size () constβ size of the file, as auintmax_t.uintmax_t file_size (error_code &__ec) const noexceptβ witherror_code &__ec,const,noexcept.uintmax_t hard_link_count () constβ how many hard links, as auintmax_t.uintmax_t hard_link_count (error_code &__ec) const noexceptβerror_code &__ecflavour,const,noexcept.bool is_block_file () constβ is it a block file?constbool, bestie.bool is_block_file (error_code &__ec) const noexceptβerror_code &__ecversion,const,noexcept.bool is_character_file () constβ character file check,const.bool is_character_file (error_code &__ec) const noexceptβ witherror_code &__ec,const,noexcept.bool is_directory () constβ directory check,const.bool is_directory (error_code &__ec) const noexceptβerror_code &__ectwin,const,noexcept.bool is_fifo () constβ FIFO check,const.bool is_fifo (error_code &__ec) const noexceptβerror_code &__ectwin,const,noexcept.bool is_other () constβ the "none of the above" check,const.bool is_other (error_code &__ec) const noexceptβerror_code &__ecversion,const,noexcept.bool is_regular_file () constβ regular file check,const.bool is_regular_file (error_code &__ec) const noexceptβerror_code &__ecversion,const,noexcept.bool is_socket () constβ socket check,const.bool is_socket (error_code &__ec) const noexceptβerror_code &__ecversion,const,noexcept.bool is_symlink () constβ symlink check,const.bool is_symlink (error_code &__ec) const noexceptβerror_code &__ecversion,const,noexcept.file_time_type last_write_time () constβ last write time, returned as afile_time_type.file_time_type last_write_time (error_code &__ec) const noexceptβerror_code &__ecversion,const,noexcept.operator const filesystem::path & () const noexceptβ implicit conversion toconst filesystem::path &,const,noexcept, slay.strong_ordering operator<=> (const directory_entry &__rhs) const noexceptβ the spaceship, returnsstrong_ordering, takesconst directory_entry &__rhs,const,noexcept. three-way comparison ate and left no crumbs πdirectory_entry & operator= (const directory_entry &)=defaultβ copy assignment, defaulted.directory_entry & operator= (directory_entry &&) noexcept=defaultβ move assignment, defaulted,noexcept.bool operator== (const directory_entry &__rhs) const noexceptβ equality againstconst directory_entry &__rhs,const,noexcept.const filesystem::path & path () const noexceptβ hands you theconst filesystem::path &,const,noexcept.void refresh ()β refresh, no args.void refresh (error_code &__ec) noexceptβ refresh witherror_code &__ec,noexcept.void replace_filename (const filesystem::path &__p)β swap in a new filename from afilesystem::path.void replace_filename (const filesystem::path &__p, error_code &__ec)β witherror_code &__ec.file_status status () constβ returns afile_status,const.file_status status (error_code &__ec) const noexceptβerror_code &__ecversion,const,noexcept.file_status symlink_status () constβ returns afile_status,const.file_status symlink_status (error_code &__ec) const noexceptβerror_code &__ecversion,const,noexcept.
π«Ά Friends π«Ά
the inner circle. the group chat. the ones who get to see behind the curtain π₯
struct _Dirclass directory_iteratortemplate<typename _CharT, typename _Traits> basic_ostream< _CharT, _Traits > & operator<< (basic_ostream< _CharT, _Traits > &__os, const directory_entry &__d)β yes bestie she streams, she's printable, she's in yourbasic_ostream< _CharT, _Traits >πclass recursive_directory_iterator
π Detailed Description π
The value type used by directory iterators. that's it. that's the detailed description. she said what she said π
β Since β
C++17
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. no cap, a robot wrote this and honestly? it ate.
ok that's the whole page bestie, every signature accounted for, nothing skipped, nothing invented. go forth and iterate π¦
and that's a wrap on std::files...tory_entry(3) from the libstdc++ girlies β mwah π π«Ά </final>
π¦ where this page comes from
- arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
- fedora 44: libstdc++-docs 16.0.1-0.10.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- fedora 44: libstdc++-docs 16.2.1-2.fc44
- fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms