STD::FILESYSTEM_FILESYSTEM_ERROR(3)
β¨ NAME β¨
std::filesystem::filesystem_error β the exception type that the Filesystem library throws, straight out of the Library Functions Manual (section 3, bestie, we're in the library functions girlies π
)
πΈ SYNOPSIS πΈ
It inherits std::system_error. That's the whole vibe. A filesystem_error is a system_error, no cap π«Ά
π Public Member Functions
filesystem_error (const filesystem_error &)=defaultβ the defaulted copy constructor, iconic, does exactly what you'd think πfilesystem_error (const string &__what_arg, const path &__p1, const path &__p2, error_code __ec)β builds one with a what-string, two paths, and anerror_codeβ¨filesystem_error (const string &__what_arg, const path &__p1, error_code __ec)β same energy but with just one path and theerror_codeπfilesystem_error (const string &__what_arg, error_code __ec)β the minimalist version: what-string +error_code, no paths attached πconst error_code & code () const noexceptβ hands you theerror_codeback,noexceptso she's safe πfilesystem_error & operator= (const filesystem_error &)=defaultβ defaulted copy assignment, and yes she returnsfilesystem_error &πconst path & path1 () const noexceptβ the first path,noexcept, cute π¦const path & path2 () const noexceptβ the second path, alsonoexceptπ§const char * what () const noexceptβ the C-style string explaining the drama,noexceptπΊ
π¦ Detailed Description π¦
Okay so real talk: std::filesystem::filesystem_error is the exception type thrown by the Filesystem library. That's the entire description and honestly she ate π₯
π Member Function Documentation π
const char* std::filesystem::filesystem_error::what () const [virtual], [noexcept]
Returns a C-style character string that describes the general cause of the current error β and it's literally the same string you passed to the ctor, so no surprise plot twists here π
Reimplemented from std::runtime_error. periodt π
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. Not a human, just a robot doing her little robot thing π€π
And that's the whole page bestie!! This gorgeous piece of documentation was brought to you by libstdc++, dated Wed Oct 7 2026 β go forth and catch those filesystem exceptions responsibly π«Άβ¨π
π¦ 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