std::experi...egular_file(3)
Hey bestie π you just opened the std::experi...egular_file(3) page from the C++ Standard Libary manual β and yes, weβre gonna get into it β¨
β¨ NAME β¨
std::experimental::filesystem::is_regular_file β std::experimental::filesystem::is_regular_file (yes, the description is literally the name again, and honestly? iconic π).
πΈ Synopsis πΈ
Defined in header <experimental/filesystem>
bool is_regular_file( file_status s ); (1)
(filesystem TS)
bool is_regular_file( const path& p ); (2)
(filesystem TS)
bool is_regular_file( const path& p, error_code& ec ); (3)
(filesystem TS)
The vibe check: it checks if the given file status or path corresponds to a regular file π¦
1)Equivalent tos.type() == file_type::regular.2)Equivalent tois_regular_file(status(p)).3)Equivalent tois_regular_file(status(p, ec)). Returnsfalseand setsecto an appropriate error code if an error occurs. Otherwise,ecis cleared with a call toec.clear().
This section is incomplete Reason: the specification says that (2) throwsfilesystem_errorifstatus(p)would throwfilesystem_error. This is different from the rest ofis_**_filefunctions. Is that correct and if yes, what's the rationale?
π Parameters π
sβ file status to checkpβ path to examineecβ error code to store the error status to
π Return value π
true if the given path or file status corresponds to a regular link, false otherwise β¨
π¨ Exceptions π¨
1,3)βnoexceptspecification:noexcept2)β Throwsfilesystem_errorif an error occurs. The error is constructed withpas an argument. The error code is set to an appropriate error code for the error that caused the failure.
π See also π
This section is incomplete
ποΈ Categories ποΈ
- Noindexed pages
- Todo with reason
- unconditionally noexcept
- Todo without reason
π Hidden categories π
- Pages with unreviewed unconditional noexcept template
- Pages with unreviewed noexcept template
mwah π β sourced from http://cppreference.com, dated 2024.06.10 π«Ά
π¦ 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