std::filesy...ectory_entry(3)
π NAME π
okay bestie, welcome to the manual page for std::filesystem::directory_entry::directory_entry β yes, the constructor page, and the manual name up top is literally std::filesy...ectory_entry(3) (that truncation is giving "my group chat name hit the character limit" π). It's from the C++ Standard Libary β their spelling, not mine β and the NAME line is a whole echo:
std::filesystem::directory_entry::directory_entry -
std::filesystem::directory_entry::directory_entry
β¨ Synopsis β¨
okay so here's the overload lineup, copied exactly because we do not mess with code, periodt:
directory_entry() noexcept = default;
(1) (since C++17)
directory_entry( const directory_entry& ) = default;
(2) (since C++17)
directory_entry( directory_entry&& ) noexcept = default;
(3) (since C++17)
explicit directory_entry( const std::filesystem::path& p );
(4) (since C++17)
directory_entry( const std::filesystem::path& p, std::error_code&
(5) (since C++17)
ec );
This whole thing constructs a new directory_entry object. The overloads break down like this:
1)Default constructor. It just does the default thing. π2)Defaulted copy constructor. Copy vibe, defaulted.3)Defaulted move constructor. Move vibe, and it'snoexcept.4,5)These initialize the directory entry with pathpand callrefreshto update the cached attributes. If an error occurs, the non-throwing overload leaves thedirectory_entryholding a default-constructedpath.
π Parameters π
pβ path to the filesystem object to which the directory entry will refer.ecβ out-parameter for error reporting in the non-throwing overload.
π Exceptions π
Any overload not marked noexcept may throw std::bad_alloc if memory allocation fails. That's the baseline; even icons have bad days.
1-4)β Throwsstd::filesystem::filesystem_erroron underlying OS API errors, constructed withpas the first path argument and the OS error code as the error code argument.5)β Sets astd::error_code¶meter to the OS API error code if an OS API call fails, and executesec.clear()if no errors occur.
π¦ Example π¦
This section is incomplete Reason: no example
not me finding an empty example section π it's giving "left on read."
π Category: π
Todo no example
That's the whole page, bestie. Source: http://cppreference.com, version/date: 2024.06.10, manual name: std::filesy...ectory_entry(3). Periodt. πβ¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms